CVS update: php31/ext/standard

From: Date: Mon, 21 Sep 1998 11:23:03 +0000
Subject: CVS update: php31/ext/standard
Groups: php.dev 
Request: Send a blank email to php-dev+get-1324@lists.php.net to get a copy of this message
Date: Monday September 21, 1998 @ 7:23 Author: zeev Update of /repository/php31/ext/standard In directory asf:/u2/tmp/cvs-serv28441/ext/standard Modified Files: basic_functions.c info.c Log Message: port 64-bit patches Index: php31/ext/standard/basic_functions.c diff -c php31/ext/standard/basic_functions.c:2.16 php31/ext/standard/basic_functions.c:2.17 *** php31/ext/standard/basic_functions.c:2.16 Tue Sep 15 18:35:40 1998 --- php31/ext/standard/basic_functions.c Mon Sep 21 07:23:01 1998 *************** *** 903,909 **** { pval *array,*entry,real_entry; char *string_key; ! int int_key; int retval; pval *inserted_pointer; --- 903,909 ---- { pval *array,*entry,real_entry; char *string_key; ! ulong num_key; int retval; pval *inserted_pointer; *************** *** 930,941 **** 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); --- 930,941 ---- 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_INT: ! 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); *************** *** 992,998 **** { pval *array; char *string_key; ! int int_key; if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &array) == FAILURE) { WRONG_PARAM_COUNT; --- 992,998 ---- { pval *array; char *string_key; ! ulong num_key; if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &array) == FAILURE) { WRONG_PARAM_COUNT; *************** *** 1004,1010 **** 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); --- 1004,1010 ---- 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); *************** *** 1012,1018 **** break; case HASH_KEY_IS_INT: return_value->type = IS_LONG; ! return_value->value.lval = int_key; break; case HASH_KEY_NON_EXISTANT: return; --- 1012,1018 ---- break; case HASH_KEY_IS_INT: return_value->type = IS_LONG; ! return_value->value.lval = num_key; break; case HASH_KEY_NON_EXISTANT: return; Index: php31/ext/standard/info.c diff -c php31/ext/standard/info.c:2.6 php31/ext/standard/info.c:2.7 *** php31/ext/standard/info.c:2.6 Wed Sep 16 09:05:25 1998 --- php31/ext/standard/info.c Mon Sep 21 07:23:02 1998 *************** *** 142,148 **** { pval *data, *tmp; char *string_key; ! int int_key; SECTION("PHP Variables"); --- 142,148 ---- { pval *data, *tmp; char *string_key; ! ulong num_key; SECTION("PHP Variables"); *************** *** 181,192 **** 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 "\">"); --- 181,192 ---- 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_INT: ! php3_printf("%ld",num_key); break; } PUTS("\"]</td><td bgcolor=\"" CONTENTS_COLOR "\">"); *************** *** 200,211 **** 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 "\">"); --- 200,211 ---- 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_INT: ! php3_printf("%ld",num_key); break; } PUTS("\"]</td><td bgcolor=\"" CONTENTS_COLOR "\">"); *************** *** 219,230 **** 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 "\">"); --- 219,230 ---- 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_INT: ! 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

« previous php.dev (#1324) next »