diff --git a/Zend/zend.c b/Zend/zend.c index 28ce67ed515..780555d3024 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -139,7 +139,7 @@ static void print_hash(zend_write_func_t write_func, HashTable *ht, int indent, zval **tmp; char *string_key; HashPosition iterator; - ulong num_key; + zend_uint_t num_key; zend_str_size str_len; int i; @@ -201,7 +201,7 @@ static void print_flat_hash(HashTable *ht TSRMLS_DC) /* {{{ */ zval **tmp; char *string_key; HashPosition iterator; - ulong num_key; + zend_uint_t num_key; zend_str_size str_len; int i = 0; diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index fa36acafe0a..153b4d2338f 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -575,7 +575,7 @@ ZEND_FUNCTION(each) zval *array, *entry, **entry_ptr, *tmp; char *string_key; zend_str_size string_key_len; - ulong num_key; + zend_uint_t num_key; zval **inserted_pointer; HashTable *target_hash; @@ -911,7 +911,7 @@ static void add_class_vars(zend_class_entry *ce, int statics, zval *return_value zval *prop, *prop_copy; char *key; zend_str_size key_len; - ulong num_index; + zend_uint_t num_index; zend_hash_internal_pointer_reset_ex(&ce->properties_info, &pos); while (zend_hash_get_current_data_ex(&ce->properties_info, (void **) &prop_info, &pos) == SUCCESS) { @@ -991,7 +991,7 @@ ZEND_FUNCTION(get_object_vars) char *key; const char *prop_name, *class_name; zend_str_size key_len, prop_len; - ulong num_index; + zend_uint_t num_index; zend_object *zobj; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o", &obj) == FAILURE) { @@ -1078,7 +1078,7 @@ ZEND_FUNCTION(get_class_methods) EG(scope) == mptr->common.scope)))) { char *key; zend_str_size key_len; - ulong num_index; + zend_uint_t num_index; zend_str_size len = strlen(mptr->common.function_name); /* Do not display old-style inherited constructors */ @@ -1177,7 +1177,7 @@ ZEND_FUNCTION(property_exists) zend_class_entry *ce, **pce; zend_property_info *property_info; zval property_z; - ulong h; + zend_uint_t h; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zS", &object, &property, &property_len) == FAILURE) { return; diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 09713eb7ad8..ddff1793aee 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -1343,7 +1343,7 @@ static void preg_replace_impl(INTERNAL_FUNCTION_PARAMETERS, int is_callable_repl int limit_val = -1; php_int_t limit = -1; char *string_key; - ulong num_key; + zend_uint_t num_key; char *callback_name; int replace_count=0, old_replace_count; @@ -1770,7 +1770,7 @@ PHPAPI void php_pcre_grep_impl(pcre_cache_entry *pce, zval *input, zval *return int size_offsets; /* Size of the offsets array */ int count = 0; /* Count of matched subpatterns */ char *string_key; - ulong num_key; + zend_uint_t num_key; zend_bool invert; /* Whether to return non-matching entries */ int rc; diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index fbc887d062b..3ddd845524c 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -436,7 +436,7 @@ static void _class_string(string *str, zend_class_entry *ce, zval *obj, char *in zval **value; char *key; zend_str_size key_len; - ulong num_index; + zend_uint_t num_index; zend_hash_internal_pointer_reset_ex(&ce->constants_table, &pos); @@ -567,7 +567,7 @@ static void _class_string(string *str, zend_class_entry *ce, zval *obj, char *in while (zend_hash_get_current_data_ex(properties, (void **) &prop, &pos) == SUCCESS) { char *prop_name; zend_str_size prop_name_size; - ulong index; + zend_uint_t index; if (zend_hash_get_current_key_ex(properties, &prop_name, &prop_name_size, &index, 1, &pos) == HASH_KEY_IS_STRING) { if (prop_name_size && prop_name[0]) { /* skip all private and protected properties */ @@ -606,7 +606,7 @@ static void _class_string(string *str, zend_class_entry *ce, zval *obj, char *in { char *key; zend_str_size key_len; - ulong num_index; + zend_uint_t num_index; zend_str_size len = strlen(mptr->common.function_name); /* Do not display old-style inherited constructors */ @@ -791,7 +791,7 @@ static void _function_parameter_string(string *str, zend_function *fptr, char* i static void _function_closure_string(string *str, zend_function *fptr, char* indent TSRMLS_DC) { zend_uint i, count; - ulong num_index; + zend_uint_t num_index; char *key; zend_str_size key_len; HashTable *static_variables; @@ -3380,7 +3380,7 @@ static void add_class_vars(zend_class_entry *ce, int statics, zval *return_value zval *prop, *prop_copy; char *key; zend_str_size key_len; - ulong num_index; + zend_uint_t num_index; zend_hash_internal_pointer_reset_ex(&ce->properties_info, &pos); while (zend_hash_get_current_data_ex(&ce->properties_info, (void **) &prop_info, &pos) == SUCCESS) { diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c index 8afc86686cc..c4593dcf4e2 100644 --- a/ext/spl/php_spl.c +++ b/ext/spl/php_spl.c @@ -417,7 +417,7 @@ PHP_FUNCTION(spl_autoload_call) zend_str_size_int class_name_len; char *func_name, *lc_name; zend_str_size_uint func_name_len; - ulong dummy; + zend_uint_t dummy; HashPosition function_pos; autoload_func_info *alfi; @@ -750,7 +750,7 @@ PHP_FUNCTION(spl_autoload_functions) } else { char *key; zend_str_size_uint len; - long dummy; + zend_uint_t dummy; zend_hash_get_current_key_ex(SPL_G(autoload_functions), &key, &len, &dummy, 0, &function_pos); add_next_index_stringl(return_value, key, len - 1, 1); } diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c index 052ba3f95e2..f442da8cd79 100644 --- a/ext/spl/spl_array.c +++ b/ext/spl/spl_array.c @@ -67,7 +67,7 @@ typedef struct _spl_array_object { zval *array; zval *retval; HashPosition pos; - ulong pos_h; + zend_uint_t pos_h; int ar_flags; int is_self; zend_function *fptr_offset_get; @@ -917,7 +917,7 @@ static int spl_array_skip_protected(spl_array_object *intern, HashTable *aht TSR { char *string_key; zend_str_size string_length; - ulong num_key; + zend_uint_t num_key; if (Z_TYPE_P(intern->array) == IS_OBJECT) { do { diff --git a/ext/spl/spl_fixedarray.c b/ext/spl/spl_fixedarray.c index 95d6b7ab45c..3303fbdeaeb 100644 --- a/ext/spl/spl_fixedarray.c +++ b/ext/spl/spl_fixedarray.c @@ -703,7 +703,7 @@ SPL_METHOD(SplFixedArray, fromArray) if (num > 0 && save_indexes) { zval **element, *value; char *str_index; - ulong num_index, max_index = 0; + zend_uint_t num_index, max_index = 0; long tmp; for (zend_hash_internal_pointer_reset(Z_ARRVAL_P(data)); diff --git a/ext/standard/html.c b/ext/standard/html.c index 3582318c5e5..242b8e0f86f 100644 --- a/ext/standard/html.c +++ b/ext/standard/html.c @@ -844,7 +844,7 @@ static inline int process_named_entity_html(const char **buf, const char **start static inline int resolve_named_entity_html(const char *start, zend_str_size_size_t length, const entity_ht *ht, unsigned *uni_cp1, unsigned *uni_cp2) { const entity_cp_map *s; - ulong hash = zend_inline_hash_func(start, length); + zend_uint_t hash = zend_inline_hash_func(start, length); s = ht->buckets[hash % ht->num_elems]; while (s->entity) { diff --git a/ext/standard/http.c b/ext/standard/http.c index ce3814dfc55..5d8bd5b04eb 100644 --- a/ext/standard/http.c +++ b/ext/standard/http.c @@ -36,7 +36,7 @@ PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, zend_str_size_int arg_sep_len, ekey_len, newprefix_len; int key_type; zend_str_size_uint key_len; - ulong idx; + zend_uint_t idx; zval **zdata = NULL, *copyzval; if (!ht) { diff --git a/ext/standard/info.c b/ext/standard/info.c index 2210ebb1433..303c8ab2944 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -197,7 +197,7 @@ static void php_print_gpcse_array(char *name, uint name_length TSRMLS_DC) zval **data, **tmp, tmp2; char *string_key; zend_str_size_uint string_len; - ulong num_key; + zend_uint_t num_key; zend_is_auto_global(name, name_length TSRMLS_CC); diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c index 54d1f44e50d..b9288edca1f 100644 --- a/ext/standard/proc_open.c +++ b/ext/standard/proc_open.c @@ -82,7 +82,7 @@ static php_process_env_t _php_array_to_envp(zval *environment, int is_persistent #endif char *p; zend_str_size string_length, cnt, l, sizeenv=0, el_len; - ulong num_key; + zend_uint_t num_key; HashTable *target_hash; HashPosition pos; @@ -519,7 +519,7 @@ PHP_FUNCTION(proc_open) zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(descriptorspec), &pos); while (zend_hash_get_current_data_ex(Z_ARRVAL_P(descriptorspec), (void **)&descitem, &pos) == SUCCESS) { char *str_index; - ulong nindex; + zend_uint_t nindex; zval **ztype; str_index = NULL; diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c index 79380588fa5..e401aa22660 100644 --- a/ext/standard/streamsfuncs.c +++ b/ext/standard/streamsfuncs.c @@ -543,7 +543,7 @@ PHP_FUNCTION(stream_get_transports) HashTable *stream_xport_hash; char *stream_xport; zend_str_size stream_xport_len; - ulong num_key; + zend_uint_t num_key; if (zend_parse_parameters_none() == FAILURE) { return; @@ -573,7 +573,7 @@ PHP_FUNCTION(stream_get_wrappers) char *stream_protocol; int key_flags; zend_str_size stream_protocol_len = 0; - ulong num_key; + zend_uint_t num_key; if (zend_parse_parameters_none() == FAILURE) { return; @@ -659,7 +659,7 @@ static int stream_array_from_fd_set(zval *stream_array, fd_set *fds TSRMLS_DC) int type; char *key; zend_str_size key_len; - ulong num_ind; + zend_uint_t num_ind; /* Temporary int fd is needed for the STREAM data type on windows, passing this_fd directly to php_stream_cast() would eventually bring a wrong result on x64. php_stream_cast() casts to int internally, and this will leave the higher bits of a SOCKET variable uninitialized on systems with little endian. */ @@ -925,7 +925,7 @@ static int parse_context_options(php_stream_context *context, zval *options TSRM char *wkey, *okey; zend_str_size wkey_len, okey_len; int ret = SUCCESS; - ulong num_key; + zend_uint_t num_key; zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(options), &pos); while (SUCCESS == zend_hash_get_current_data_ex(Z_ARRVAL_P(options), (void**)&wval, &pos)) { diff --git a/ext/standard/string.c b/ext/standard/string.c index 5d24eea516d..aed2b0d5443 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -2406,7 +2406,7 @@ PHP_FUNCTION(substr_replace) } else { /* str is array of strings */ char *str_index = NULL; zend_str_size str_index_len; - ulong num_index; + zend_uint_t num_index; array_init(return_value); @@ -2426,7 +2426,7 @@ PHP_FUNCTION(substr_replace) while (zend_hash_get_current_data_ex(Z_ARRVAL_PP(str), (void **) &tmp_str, &pos_str) == SUCCESS) { zval *orig_str; zval dummy; - ulong refcount; + zend_uint_t refcount; int was_ref; if(Z_TYPE_PP(tmp_str) != IS_STRING) { @@ -2895,7 +2895,7 @@ static PATNREPL *php_strtr_array_prepare_repls(zend_str_size_int slen, HashTable zend_hash_move_forward_ex(pats, &hpos)) { char *string_key; zend_str_size string_key_len; - ulong num_key; + zend_uint_t num_key; zval *tzv = NULL; switch (zend_hash_get_current_key_ex(pats, &string_key, &string_key_len, &num_key, 0, &hpos)) { @@ -3942,7 +3942,7 @@ static void php_str_replace_common(INTERNAL_FUNCTION_PARAMETERS, int case_sensit zval *result; char *string_key; zend_str_size string_key_len; - ulong num_key; + zend_uint_t num_key; zend_str_size count = 0; int argc = ZEND_NUM_ARGS(); diff --git a/ext/standard/user_filters.c b/ext/standard/user_filters.c index 130cbea07a4..e13188b8cce 100644 --- a/ext/standard/user_filters.c +++ b/ext/standard/user_filters.c @@ -547,7 +547,7 @@ PHP_FUNCTION(stream_get_filters) int key_flags; zend_str_size filter_name_len = 0; HashTable *filters_hash; - ulong num_key; + zend_uint_t num_key; if (zend_parse_parameters_none() == FAILURE) { return; diff --git a/ext/standard/var.c b/ext/standard/var.c index cb7bd5cbbbb..30e38a66606 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -545,7 +545,7 @@ static void php_var_serialize_intern(smart_str *buf, zval *struc, HashTable *var static inline int php_add_var_hash(HashTable *var_hash, zval *var, void *var_old TSRMLS_DC) /* {{{ */ { - ulong var_no; + zend_uint_t var_no; char id[32], *p; register zend_str_size len; @@ -567,7 +567,7 @@ static inline int php_add_var_hash(HashTable *var_hash, zval *var, void *var_old zend_hash_next_index_insert(var_hash, &var_no, sizeof(var_no), NULL); } #if 0 - fprintf(stderr, "- had var (%d): %lu\n", Z_TYPE_P(var), **(ulong**)var_old); + fprintf(stderr, "- had var (%d): %lu\n", Z_TYPE_P(var), **(zend_uint_t**)var_old); #endif return FAILURE; } @@ -633,7 +633,7 @@ static void php_var_serialize_class(smart_str *buf, zval *struc, zval *retval_pt if (count > 0) { char *key; zval **d, **name; - ulong index; + zend_uint_t index; HashPosition pos; int i; zval nval, *nvalp; @@ -709,7 +709,7 @@ static void php_var_serialize_class(smart_str *buf, zval *struc, zval *retval_pt static void php_var_serialize_intern(smart_str *buf, zval *struc, HashTable *var_hash TSRMLS_DC) /* {{{ */ { int i; - ulong *var_already; + zend_uint_t *var_already; HashTable *myht; if (EG(exception)) { @@ -851,7 +851,7 @@ static void php_var_serialize_intern(smart_str *buf, zval *struc, HashTable *var if (i > 0) { char *key; zval **data; - ulong index; + zend_uint_t index; zend_str_size key_len; HashPosition pos; diff --git a/main/php_ini.c b/main/php_ini.c index ad3dc8fd86a..eeaddce2385 100644 --- a/main/php_ini.c +++ b/main/php_ini.c @@ -771,7 +771,7 @@ PHPAPI void php_ini_activate_config(HashTable *source_hash, int modify_type, int char *str; zval *data; zend_str_size str_len; - ulong num_index; + zend_uint_t num_index; /* Walk through config hash and alter matching ini entries using the values found in the hash */ for (zend_hash_internal_pointer_reset(source_hash); diff --git a/main/php_variables.c b/main/php_variables.c index af7c69ed842..97d5ea12ccf 100644 --- a/main/php_variables.c +++ b/main/php_variables.c @@ -654,7 +654,7 @@ static void php_autoglobal_merge(HashTable *dest, HashTable *src TSRMLS_DC) zval **src_entry, **dest_entry; char *string_key; zend_str_size string_key_len; - ulong num_key; + zend_uint_t num_key; HashPosition pos; int key_type; int globals_check = (dest == (&EG(symbol_table))); diff --git a/main/streams/streams.c b/main/streams/streams.c index bd72287ed62..8dc3628823c 100644 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -123,7 +123,7 @@ PHPAPI int php_stream_from_persistent_id(const char *persistent_id, php_stream * if (stream) { HashPosition pos; zend_rsrc_list_entry *regentry; - ulong index = -1; /* intentional */ + zend_uint_t index = -1; /* intentional */ /* see if this persistent resource already has been loaded to the * regular list; allowing the same resource in several entries in the diff --git a/win32/registry.c b/win32/registry.c index f646a970bd6..e13a0fc7225 100644 --- a/win32/registry.c +++ b/win32/registry.c @@ -101,7 +101,7 @@ static int LoadDirectory(HashTable *directories, HKEY key, char *path, int path_ HashPosition pos; char *index; uint index_len; - ulong num; + zend_uint_t num; zval **tmpdata; for (zend_hash_internal_pointer_reset_ex(parent_ht, &pos); @@ -254,7 +254,7 @@ void UpdateIniFromRegistry(char *path TSRMLS_DC) HashPosition pos; char *index; uint index_len; - ulong num; + zend_uint_t num; zval **data; for (zend_hash_internal_pointer_reset_ex(ht, &pos);