CVS update: php3/functions
| From: | zeev | Date: | Sun, 20 Sep 1998 22:43:48 +0000 |
| Subject: | CVS update: php3/functions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-1307@lists.php.net to get a copy of this message | ||
Date: Sunday September 20, 1998 @ 18:43
Author: zeev
Update of /repository/php3/functions
In directory asf:/u2/tmp/cvs-serv8184/functions
Modified Files:
basic_functions.c hw.c info.c
Log Message:
More 64-bit patches
Index: php3/functions/basic_functions.c
diff -c php3/functions/basic_functions.c:1.218 php3/functions/basic_functions.c:1.219
*** php3/functions/basic_functions.c:1.218 Sun Sep 20 16:30:52 1998
--- php3/functions/basic_functions.c Sun Sep 20 18:43:46 1998
***************
*** 790,796 ****
RETURN_TRUE;
}
- static pval *user_compare_func_name;
static int array_user_compare(const void *a, const void *b)
{
--- 790,795 ----
***************
*** 943,949 ****
{
pval *array,*entry,real_entry;
char *string_key;
! int int_key;
int retval;
pval *inserted_pointer;
--- 942,948 ----
{
pval *array,*entry,real_entry;
char *string_key;
! ulong num_key;
int retval;
pval *inserted_pointer;
***************
*** 970,981 ****
pval_copy_constructor(&real_entry);
_php3_hash_index_update(return_value->value.ht,1,(void *) &real_entry,sizeof(pval),(void
**) &inserted_pointer);
_php3_hash_pointer_update(return_value->value.ht, "value",
sizeof("value"), (void *) inserted_pointer);
! switch (_php3_hash_get_current_key(array->value.ht, &string_key, &int_key)) {
case HASH_KEY_IS_STRING:
add_get_index_string(return_value,0,string_key,(void **) &inserted_pointer,0);
break;
! case HASH_KEY_IS_INT:
! add_get_index_long(return_value,0,int_key, (void **) &inserted_pointer);
break;
}
_php3_hash_pointer_update(return_value->value.ht, "key", sizeof("key"),
(void *) inserted_pointer);
--- 969,980 ----
pval_copy_constructor(&real_entry);
_php3_hash_index_update(return_value->value.ht,1,(void *) &real_entry,sizeof(pval),(void
**) &inserted_pointer);
_php3_hash_pointer_update(return_value->value.ht, "value",
sizeof("value"), (void *) inserted_pointer);
! switch (_php3_hash_get_current_key(array->value.ht, &string_key, &num_key)) {
case HASH_KEY_IS_STRING:
add_get_index_string(return_value,0,string_key,(void **) &inserted_pointer,0);
break;
! case HASH_KEY_IS_LONG:
! add_get_index_long(return_value,0,num_key, (void **) &inserted_pointer);
break;
}
_php3_hash_pointer_update(return_value->value.ht, "key", sizeof("key"),
(void *) inserted_pointer);
***************
*** 1032,1038 ****
{
pval *array;
char *string_key;
! int int_key;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &array) == FAILURE) {
WRONG_PARAM_COUNT;
--- 1031,1037 ----
{
pval *array;
char *string_key;
! ulong num_key;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &array) == FAILURE) {
WRONG_PARAM_COUNT;
***************
*** 1044,1058 ****
if (!ParameterPassedByReference(ht,1)) {
php3_error(E_WARNING, "Array not passed by reference in call to key()");
}
! switch (_php3_hash_get_current_key(array->value.ht, &string_key, &int_key)) {
case HASH_KEY_IS_STRING:
return_value->value.str.val = string_key;
return_value->value.str.len = strlen(string_key);
return_value->type = IS_STRING;
break;
! case HASH_KEY_IS_INT:
return_value->type = IS_LONG;
! return_value->value.lval = int_key;
break;
case HASH_KEY_NON_EXISTANT:
return;
--- 1043,1057 ----
if (!ParameterPassedByReference(ht,1)) {
php3_error(E_WARNING, "Array not passed by reference in call to key()");
}
! switch (_php3_hash_get_current_key(array->value.ht, &string_key, &num_key)) {
case HASH_KEY_IS_STRING:
return_value->value.str.val = string_key;
return_value->value.str.len = strlen(string_key);
return_value->type = IS_STRING;
break;
! case HASH_KEY_IS_LONG:
return_value->type = IS_LONG;
! return_value->value.lval = num_key;
break;
case HASH_KEY_NON_EXISTANT:
return;
Index: php3/functions/hw.c
diff -c php3/functions/hw.c:1.10 php3/functions/hw.c:1.11
*** php3/functions/hw.c:1.10 Tue Sep 15 19:40:03 1998
--- php3/functions/hw.c Sun Sep 20 18:43:47 1998
***************
*** 23,29 ****
+----------------------------------------------------------------------+
*/
! /* $Id: hw.c,v 1.10 1998/09/15 23:40:03 shane Exp $ */
#if COMPILE_DL
#include "dl/phpdl.h"
#endif
--- 23,29 ----
+----------------------------------------------------------------------+
*/
! /* $Id: hw.c,v 1.11 1998/09/20 22:43:47 zeev Exp $ */
#if COMPILE_DL
#include "dl/phpdl.h"
#endif
***************
*** 328,334 ****
}
static char * make_objrec_from_array(HashTable *lht) {
! int i, count, keytype, length;
char *key, str[1024], *objrec = NULL;
pval *keydata;
--- 328,335 ----
}
static char * make_objrec_from_array(HashTable *lht) {
! int i, count, keytype;
! ulong length;
char *key, str[1024], *objrec = NULL;
pval *keydata;
***************
*** 1235,1241 ****
for(i=0; i<_php3_hash_num_elements(newobjarr); i++) {
char *key, *str, *str1, newattribute[200];
pval *data;
! int j, ind, noinsert=1;
_php3_hash_get_current_key(newobjarr, &key, &ind);
_php3_hash_get_current_data(newobjarr, (void *) &data);
--- 1236,1243 ----
for(i=0; i<_php3_hash_num_elements(newobjarr); i++) {
char *key, *str, *str1, newattribute[200];
pval *data;
! int j, noinsert=1;
! ulong ind;
_php3_hash_get_current_key(newobjarr, &key, &ind);
_php3_hash_get_current_data(newobjarr, (void *) &data);
Index: php3/functions/info.c
diff -c php3/functions/info.c:1.64 php3/functions/info.c:1.65
*** php3/functions/info.c:1.64 Fri Aug 14 19:47:16 1998
--- php3/functions/info.c Sun Sep 20 18:43:47 1998
***************
*** 208,214 ****
{
pval *data, *tmp;
char *string_key;
! int int_key;
SECTION("PHP Variables");
--- 208,214 ----
{
pval *data, *tmp;
char *string_key;
! ulong num_key;
SECTION("PHP Variables");
***************
*** 247,258 ****
while (_php3_hash_get_current_data(data->value.ht, (void **) &tmp) == SUCCESS) {
convert_to_string(tmp);
PUTS("<tr><td bgcolor=\"" ENTRY_NAME_COLOR
"\">HTTP_GET_VARS[\"");
! switch (_php3_hash_get_current_key(data->value.ht, &string_key, &int_key)) {
case HASH_KEY_IS_STRING:
PUTS(string_key);
break;
! case HASH_KEY_IS_INT:
! php3_printf("%d",int_key);
break;
}
PUTS("\"]</td><td bgcolor=\"" CONTENTS_COLOR
"\">");
--- 247,258 ----
while (_php3_hash_get_current_data(data->value.ht, (void **) &tmp) == SUCCESS) {
convert_to_string(tmp);
PUTS("<tr><td bgcolor=\"" ENTRY_NAME_COLOR
"\">HTTP_GET_VARS[\"");
! switch (_php3_hash_get_current_key(data->value.ht, &string_key, &num_key)) {
case HASH_KEY_IS_STRING:
PUTS(string_key);
break;
! case HASH_KEY_IS_LONG:
! php3_printf("%ld",num_key);
break;
}
PUTS("\"]</td><td bgcolor=\"" CONTENTS_COLOR
"\">");
***************
*** 266,277 ****
while (_php3_hash_get_current_data(data->value.ht, (void **) &tmp) == SUCCESS) {
convert_to_string(tmp);
PUTS("<tr><td bgcolor=\"" ENTRY_NAME_COLOR
"\">HTTP_POST_VARS[\"");
! switch (_php3_hash_get_current_key(data->value.ht, &string_key, &int_key)) {
case HASH_KEY_IS_STRING:
PUTS(string_key);
break;
! case HASH_KEY_IS_INT:
! php3_printf("%d",int_key);
break;
}
PUTS("\"]</td><td bgcolor=\"" CONTENTS_COLOR
"\">");
--- 266,277 ----
while (_php3_hash_get_current_data(data->value.ht, (void **) &tmp) == SUCCESS) {
convert_to_string(tmp);
PUTS("<tr><td bgcolor=\"" ENTRY_NAME_COLOR
"\">HTTP_POST_VARS[\"");
! switch (_php3_hash_get_current_key(data->value.ht, &string_key, &num_key)) {
case HASH_KEY_IS_STRING:
PUTS(string_key);
break;
! case HASH_KEY_IS_LONG:
! php3_printf("%ld",num_key);
break;
}
PUTS("\"]</td><td bgcolor=\"" CONTENTS_COLOR
"\">");
***************
*** 285,296 ****
while (_php3_hash_get_current_data(data->value.ht, (void **) &tmp) == SUCCESS) {
convert_to_string(tmp);
PUTS("<tr><td bgcolor=\"" ENTRY_NAME_COLOR
"\">HTTP_COOKIE_VARS[\"");
! switch (_php3_hash_get_current_key(data->value.ht, &string_key, &int_key)) {
case HASH_KEY_IS_STRING:
PUTS(string_key);
break;
! case HASH_KEY_IS_INT:
! php3_printf("%d",int_key);
break;
}
PUTS("\"]</td><td bgcolor=\"" CONTENTS_COLOR
"\">");
--- 285,296 ----
while (_php3_hash_get_current_data(data->value.ht, (void **) &tmp) == SUCCESS) {
convert_to_string(tmp);
PUTS("<tr><td bgcolor=\"" ENTRY_NAME_COLOR
"\">HTTP_COOKIE_VARS[\"");
! switch (_php3_hash_get_current_key(data->value.ht, &string_key, &num_key)) {
case HASH_KEY_IS_STRING:
PUTS(string_key);
break;
! case HASH_KEY_IS_LONG:
! php3_printf("%ld",num_key);
break;
}
PUTS("\"]</td><td bgcolor=\"" CONTENTS_COLOR
"\">");
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net