From 1563fa9a6794c0fa06f84db15e19adacb5a28f93 Mon Sep 17 00:00:00 2001 From: Zeev Suraski Date: Tue, 21 Aug 2001 18:14:38 +0000 Subject: [PATCH] MFH --- ext/openssl/openssl.c | 6 ++++-- ext/session/php_session.h | 2 +- ext/session/session.c | 2 +- ext/standard/array.c | 19 ++++++++++--------- ext/standard/php_var.h | 3 ++- ext/standard/string.c | 3 ++- ext/standard/var.c | 2 +- ext/wddx/wddx.c | 6 +++--- sapi/apache2filter/apache_config.c | 4 ++-- 9 files changed, 26 insertions(+), 21 deletions(-) diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index 40f9974163a82..3d14c37b923dd 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -1284,7 +1284,8 @@ PHP_FUNCTION(openssl_pkcs7_encrypt) X509 * cert; int argc; EVP_CIPHER *cipher = NULL; - ulong strindexlen, intindex; + uint strindexlen; + ulong intindex; char * strindex; argc = ZEND_NUM_ARGS(); @@ -1419,7 +1420,8 @@ PHP_FUNCTION(openssl_pkcs7_sign) BIO * infile = NULL, * outfile = NULL; STACK_OF(X509) *others = NULL; long certresource = -1, keyresource = -1; - ulong strindexlen, intindex; + ulong intindex; + uint strindexlen; HashPosition hpos; char * strindex; diff --git a/ext/session/php_session.h b/ext/session/php_session.h index 3c36d513c17db..8eb94e11176a1 100644 --- a/ext/session/php_session.h +++ b/ext/session/php_session.h @@ -174,7 +174,7 @@ int php_session_register_serializer(const char *name, #define PS_ENCODE_VARS \ char *key; \ - ulong key_length; \ + uint key_length; \ ulong num_key; \ zval **struc; diff --git a/ext/session/session.c b/ext/session/session.c index 491b58f31816e..538f9d126440c 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -529,7 +529,7 @@ static void php_session_save_current_state(TSRMLS_D) int vallen; int ret = FAILURE; char *variable; - ulong variable_len; + uint variable_len; ulong num_key; HashPosition pos; diff --git a/ext/standard/array.c b/ext/standard/array.c index 312dfb35afff6..0029e9dc2f039 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -948,7 +948,7 @@ static int php_array_walk(HashTable *target_hash, zval **userdata TSRMLS_DC) *retval_ptr, /* Return value - unused */ *key; /* Entry key */ char *string_key; - ulong string_key_len; + uint string_key_len; ulong num_key; HashPosition pos; @@ -1144,7 +1144,8 @@ PHP_FUNCTION(extract) zval **var_array, **z_extract_type, **prefix; zval **entry, *data; char *var_name, *final_name; - ulong num_key, var_name_len; + ulong num_key; + uint var_name_len; int var_exists, extract_type, key_type, count = 0; HashPosition pos; @@ -1735,7 +1736,7 @@ PHP_FUNCTION(array_slice) argc; /* Number of function arguments */ char *string_key; - ulong string_key_len; + uint string_key_len; ulong num_key; HashPosition hpos; @@ -1821,7 +1822,7 @@ PHPAPI void php_array_merge(HashTable *dest, HashTable *src, int recursive) zval **src_entry, **dest_entry; char *string_key; - ulong string_key_len; + uint string_key_len; ulong num_key; HashPosition pos; @@ -1913,7 +1914,7 @@ PHP_FUNCTION(array_keys) *new_val; /* New value */ int add_key; /* Flag to indicate whether a key should be added */ char *string_key; /* String key */ - ulong string_key_len; + uint string_key_len; ulong num_key; /* Numeric key */ HashPosition pos; @@ -2074,7 +2075,7 @@ PHP_FUNCTION(array_reverse) **z_preserve_keys, /* Flag: whether to preserve keys */ **entry; /* An entry in the input array */ char *string_key; - ulong string_key_len; + uint string_key_len; ulong num_key; zend_bool preserve_keys = 0; HashPosition pos; @@ -2195,7 +2196,7 @@ PHP_FUNCTION(array_flip) zval **array, **entry, *data; HashTable *target_hash; char *string_key; - ulong str_key_len; + uint str_key_len; ulong num_key; HashPosition pos; @@ -2721,7 +2722,7 @@ PHP_FUNCTION(array_rand) long randval; int num_req_val, num_avail, key_type; char *string_key; - ulong string_key_len; + uint string_key_len; ulong num_key; HashPosition pos; @@ -2926,7 +2927,7 @@ PHP_FUNCTION(array_filter) zval *retval = NULL; char *callback_name; char *string_key; - ulong string_key_len; + uint string_key_len; ulong num_key; HashPosition pos; diff --git a/ext/standard/php_var.h b/ext/standard/php_var.h index f957d37e3359b..6336e0fe8ec36 100644 --- a/ext/standard/php_var.h +++ b/ext/standard/php_var.h @@ -53,8 +53,9 @@ if (var_hash) { \ while (zend_hash_get_current_data_ex(var_hash, (void **) &zval_ref, &pos) == SUCCESS) { \ if (*zval_ref == ozval) { \ char *string_key; \ - ulong str_key_len; \ + uint str_key_len; \ ulong num_key; \ + \ zend_hash_get_current_key_ex(var_hash, &string_key, &str_key_len, &num_key, 1, &pos); \ /* this is our hash and it _will_ be number indexed! */ \ zend_hash_index_update(var_hash, num_key, &nzval, sizeof(zval *), NULL); \ diff --git a/ext/standard/string.c b/ext/standard/string.c index 45e3d4451ce68..9ef011d51efe1 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -2713,7 +2713,8 @@ PHP_FUNCTION(str_replace) zval **subject, **search, **replace, **subject_entry, **pboyer; zval *result; char *string_key; - ulong string_key_len, num_key; + uint string_key_len; + ulong num_key; int boyer = 0; if(ZEND_NUM_ARGS() < 3 || diff --git a/ext/standard/var.c b/ext/standard/var.c index ba87d9dac7cfb..ac0f098093132 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -322,7 +322,7 @@ static void php_var_serialize_intern(smart_str *buf, zval **struc, HashTable *va char *key; zval **data; ulong index; - ulong key_len; + uint key_len; HashPosition pos; zend_hash_internal_pointer_reset_ex(myht, &pos); diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c index 37445b7fa7a42..b20f5e1a3bf3a 100644 --- a/ext/wddx/wddx.c +++ b/ext/wddx/wddx.c @@ -246,7 +246,7 @@ PS_SERIALIZER_DECODE_FUNC(wddx) zval *retval; zval **ent; char *key; - ulong key_length; + uint key_length; char tmp[128]; ulong idx; int hash_type; @@ -477,7 +477,7 @@ static void php_wddx_serialize_object(wddx_packet *packet, zval *obj) php_wddx_add_chunk_static(packet, WDDX_STRUCT_E); } } else { - ulong key_len; + uint key_len; PHP_CLASS_ATTRIBUTES; @@ -524,7 +524,7 @@ static void php_wddx_serialize_array(wddx_packet *packet, zval *arr) { zval **ent; char *key; - ulong key_len; + uint key_len; int is_struct = 0, ent_type; ulong idx; HashTable *target_hash; diff --git a/sapi/apache2filter/apache_config.c b/sapi/apache2filter/apache_config.c index 2b0ce50c7e071..4df9cf31f5ee1 100644 --- a/sapi/apache2filter/apache_config.c +++ b/sapi/apache2filter/apache_config.c @@ -88,7 +88,7 @@ void *merge_php_config(apr_pool_t *p, void *base_conf, void *new_conf) php_dir_entry *pe; php_dir_entry *data; char *str; - ulong str_len; + uint str_len; ulong num_index; phpapdebug((stderr, "Merge dir (%p) (%p)\n", base_conf, new_conf)); @@ -110,7 +110,7 @@ void apply_config(void *dummy) { php_conf_rec *d = dummy; char *str; - ulong str_len; + uint str_len; php_dir_entry *data; for (zend_hash_internal_pointer_reset(&d->config);