diff options
-rw-r--r-- | Zend/zend_API.c | 4 | ||||
-rw-r--r-- | Zend/zend_API.h | 2 | ||||
-rw-r--r-- | Zend/zend_closures.c | 2 | ||||
-rw-r--r-- | Zend/zend_compile.c | 8 | ||||
-rw-r--r-- | Zend/zend_exceptions.c | 6 | ||||
-rw-r--r-- | Zend/zend_execute.c | 12 | ||||
-rw-r--r-- | Zend/zend_execute_API.c | 4 | ||||
-rw-r--r-- | Zend/zend_indent.c | 2 | ||||
-rw-r--r-- | Zend/zend_inheritance.c | 4 | ||||
-rw-r--r-- | Zend/zend_interfaces.c | 8 | ||||
-rw-r--r-- | Zend/zend_iterators.c | 7 | ||||
-rw-r--r-- | Zend/zend_virtual_cwd.c | 2 | ||||
-rw-r--r-- | Zend/zend_vm_def.h | 4 | ||||
-rw-r--r-- | Zend/zend_vm_execute.h | 4 |
14 files changed, 37 insertions, 32 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 369852ffbe..2e13f3a20e 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -1127,7 +1127,7 @@ ZEND_API void zend_merge_properties(zval *obj, HashTable *properties TSRMLS_DC) } /* }}} */ -static int zval_update_class_constant(zval *pp, int is_static, int offset TSRMLS_DC) /* {{{ */ +static int zval_update_class_constant(zval *pp, int is_static, uint32_t offset TSRMLS_DC) /* {{{ */ { ZVAL_DEREF(pp); if (Z_CONSTANT_P(pp)) { @@ -2195,7 +2195,7 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio internal_function->arg_info = (zend_internal_arg_info*)ptr->arg_info+1; internal_function->num_args = ptr->num_args; /* Currently you cannot denote that the function can accept less arguments than num_args */ - if (info->required_num_args == -1) { + if (info->required_num_args == (zend_uintptr_t)-1) { internal_function->required_num_args = ptr->num_args; } else { internal_function->required_num_args = info->required_num_args; diff --git a/Zend/zend_API.h b/Zend/zend_API.h index bee797b7da..052214140f 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -525,7 +525,7 @@ ZEND_API zend_array *zend_rebuild_symbol_table(TSRMLS_D); ZEND_API void zend_attach_symbol_table(zend_execute_data *execute_data); ZEND_API void zend_detach_symbol_table(zend_execute_data *execute_data); ZEND_API int zend_set_local_var(zend_string *name, zval *value, int force TSRMLS_DC); -ZEND_API int zend_set_local_var_str(const char *name, int len, zval *value, int force TSRMLS_DC); +ZEND_API int zend_set_local_var_str(const char *name, size_t len, zval *value, int force TSRMLS_DC); ZEND_API zend_string *zend_find_alias_name(zend_class_entry *ce, zend_string *name); ZEND_API zend_string *zend_resolve_method_name(zend_class_entry *ce, zend_function *f); diff --git a/Zend/zend_closures.c b/Zend/zend_closures.c index b9d097c424..94ee585ddc 100644 --- a/Zend/zend_closures.c +++ b/Zend/zend_closures.c @@ -436,7 +436,7 @@ static const zend_function_entry closure_functions[] = { ZEND_ME(Closure, bind, arginfo_closure_bind, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) ZEND_MALIAS(Closure, bindTo, bind, arginfo_closure_bindto, ZEND_ACC_PUBLIC) ZEND_ME(Closure, call, arginfo_closure_call, ZEND_ACC_PUBLIC) - {NULL, NULL, NULL} + ZEND_FE_END }; void zend_register_closure_ce(TSRMLS_D) /* {{{ */ diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index ec449fd1da..dae6c22026 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -1033,7 +1033,7 @@ void zend_do_early_binding(TSRMLS_D) /* {{{ */ if (CG(compiler_options) & ZEND_COMPILE_DELAYED_BINDING) { uint32_t *opline_num = &CG(active_op_array)->early_binding; - while (*opline_num != -1) { + while (*opline_num != (uint32_t)-1) { opline_num = &CG(active_op_array)->opcodes[*opline_num].result.opline_num; } *opline_num = opline - CG(active_op_array)->opcodes; @@ -1074,13 +1074,13 @@ void zend_do_early_binding(TSRMLS_D) /* {{{ */ ZEND_API void zend_do_delayed_early_binding(const zend_op_array *op_array TSRMLS_DC) /* {{{ */ { - if (op_array->early_binding != -1) { + if (op_array->early_binding != (uint32_t)-1) { zend_bool orig_in_compilation = CG(in_compilation); uint32_t opline_num = op_array->early_binding; zend_class_entry *ce; CG(in_compilation) = 1; - while (opline_num != -1) { + while (opline_num != (uint32_t)-1) { if ((ce = zend_lookup_class(Z_STR_P(RT_CONSTANT(op_array, op_array->opcodes[opline_num-1].op2)) TSRMLS_CC)) != NULL) { do_bind_inherited_class(op_array, &op_array->opcodes[opline_num], EG(class_table), ce, 0 TSRMLS_CC); } @@ -1973,7 +1973,7 @@ static zend_op *zend_compile_simple_var_no_cv(znode *result, zend_ast *ast, uint /* there is a chance someone is accessing $this */ if (ast->kind != ZEND_AST_ZVAL - && CG(active_op_array)->scope && CG(active_op_array)->this_var == -1 + && CG(active_op_array)->scope && CG(active_op_array)->this_var == (uint32_t)-1 ) { zend_string *key = zend_string_init("this", sizeof("this") - 1, 0); CG(active_op_array)->this_var = lookup_cv(CG(active_op_array), key TSRMLS_CC); diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 4159a46d3c..0d5fc53da8 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -664,7 +664,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_exception___construct, 0, 0, 0) ZEND_ARG_INFO(0, previous) ZEND_END_ARG_INFO() -const static zend_function_entry default_exception_functions[] = { +static const zend_function_entry default_exception_functions[] = { ZEND_ME(exception, __clone, NULL, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL) ZEND_ME(exception, __construct, arginfo_exception___construct, ZEND_ACC_PUBLIC) ZEND_ME(exception, getMessage, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) @@ -675,7 +675,7 @@ const static zend_function_entry default_exception_functions[] = { ZEND_ME(exception, getPrevious, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) ZEND_ME(exception, getTraceAsString, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) ZEND_ME(exception, __toString, NULL, 0) - {NULL, NULL, NULL} + ZEND_FE_END }; ZEND_BEGIN_ARG_INFO_EX(arginfo_error_exception___construct, 0, 0, 0) @@ -690,7 +690,7 @@ ZEND_END_ARG_INFO() static const zend_function_entry error_exception_functions[] = { ZEND_ME(error_exception, __construct, arginfo_error_exception___construct, ZEND_ACC_PUBLIC) ZEND_ME(error_exception, getSeverity, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) - {NULL, NULL, NULL} + ZEND_FE_END }; /* }}} */ diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index b6e53ed3a8..0a156f84a4 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -1168,7 +1168,7 @@ str_index: return retval; } -static zend_never_inline zend_long zend_check_string_offset(zval *container, zval *dim, int type TSRMLS_DC) +static zend_never_inline zend_long zend_check_string_offset(zval *dim, int type TSRMLS_DC) { zend_long offset; @@ -1211,7 +1211,7 @@ try_again: static zend_always_inline zend_long zend_fetch_string_offset(zval *container, zval *dim, int type TSRMLS_DC) { - zend_long offset = zend_check_string_offset(container, dim, type TSRMLS_CC); + zend_long offset = zend_check_string_offset(dim, type TSRMLS_CC); if (Z_REFCOUNTED_P(container)) { if (Z_REFCOUNT_P(container) > 1) { @@ -1250,7 +1250,7 @@ convert_to_array: goto fetch_from_array; } - zend_check_string_offset(container, dim, type TSRMLS_CC); + zend_check_string_offset(dim, type TSRMLS_CC); ZVAL_INDIRECT(result, NULL); /* wrong string offset */ } else if (EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) { @@ -1666,7 +1666,7 @@ static zend_always_inline void i_init_func_execute_data(zend_execute_data *execu } while (var != end); } - if (op_array->this_var != -1 && EXPECTED(Z_OBJ(EX(This)))) { + if (op_array->this_var != (uint32_t)-1 && EXPECTED(Z_OBJ(EX(This)))) { ZVAL_OBJ(EX_VAR(op_array->this_var), Z_OBJ(EX(This))); GC_REFCOUNT(Z_OBJ(EX(This)))++; } @@ -1691,7 +1691,7 @@ static zend_always_inline void i_init_code_execute_data(zend_execute_data *execu zend_attach_symbol_table(execute_data); - if (op_array->this_var != -1 && EXPECTED(Z_OBJ(EX(This)))) { + if (op_array->this_var != (uint32_t)-1 && EXPECTED(Z_OBJ(EX(This)))) { ZVAL_OBJ(EX_VAR(op_array->this_var), Z_OBJ(EX(This))); GC_REFCOUNT(Z_OBJ(EX(This)))++; } @@ -1762,7 +1762,7 @@ static zend_always_inline void i_init_execute_data(zend_execute_data *execute_da } } - if (op_array->this_var != -1 && EXPECTED(Z_OBJ(EX(This)))) { + if (op_array->this_var != (uint32_t)-1 && EXPECTED(Z_OBJ(EX(This)))) { ZVAL_OBJ(EX_VAR(op_array->this_var), Z_OBJ(EX(This))); GC_REFCOUNT(Z_OBJ(EX(This)))++; } diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 760747affa..480206bfb5 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -218,7 +218,7 @@ void shutdown_destructors(TSRMLS_D) /* {{{ */ EG(symbol_table).ht.pDestructor = zend_unclean_zval_ptr_dtor; } zend_try { - int symbols; + uint32_t symbols; do { symbols = zend_hash_num_elements(&EG(symbol_table).ht); zend_hash_reverse_apply(&EG(symbol_table).ht, (apply_func_t) zval_call_destructor TSRMLS_CC); @@ -1542,7 +1542,7 @@ ZEND_API int zend_set_local_var(zend_string *name, zval *value, int force TSRMLS } /* }}} */ -ZEND_API int zend_set_local_var_str(const char *name, int len, zval *value, int force TSRMLS_DC) /* {{{ */ +ZEND_API int zend_set_local_var_str(const char *name, size_t len, zval *value, int force TSRMLS_DC) /* {{{ */ { zend_execute_data *execute_data = EG(current_execute_data); diff --git a/Zend/zend_indent.c b/Zend/zend_indent.c index b5884c72c0..22cc4d2b9e 100644 --- a/Zend/zend_indent.c +++ b/Zend/zend_indent.c @@ -34,7 +34,7 @@ static void handle_whitespace(unsigned int *emit_whitespace) { unsigned char c; - int i; + unsigned int i; for (c=0; c<128; c++) { if (emit_whitespace[c]>0) { diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index 9b81978e6e..8963d2b93b 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -591,7 +591,7 @@ static zend_bool do_inherit_method_check(HashTable *child_function_table, zend_f } /* }}} */ -static zend_bool do_inherit_property_access_check(HashTable *target_ht, zend_property_info *parent_info, zend_string *key, zend_class_entry *ce TSRMLS_DC) /* {{{ */ +static zend_bool do_inherit_property_access_check(zend_property_info *parent_info, zend_string *key, zend_class_entry *ce TSRMLS_DC) /* {{{ */ { zend_property_info *child_info; zend_class_entry *parent_ce = ce->parent; @@ -831,7 +831,7 @@ ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent } ZEND_HASH_FOREACH_END(); ZEND_HASH_FOREACH_STR_KEY_PTR(&parent_ce->properties_info, key, property_info) { - if (do_inherit_property_access_check(&ce->properties_info, property_info, key, ce TSRMLS_CC)) { + if (do_inherit_property_access_check(property_info, key, ce TSRMLS_CC)) { if (ce->type & ZEND_INTERNAL_CLASS) { property_info = zend_duplicate_property_info_internal(property_info); } else { diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c index f076289201..16ae8ea3c5 100644 --- a/Zend/zend_interfaces.c +++ b/Zend/zend_interfaces.c @@ -499,7 +499,7 @@ static int zend_implement_serializable(zend_class_entry *interface, zend_class_e /* {{{ function tables */ const zend_function_entry zend_funcs_aggregate[] = { ZEND_ABSTRACT_ME(iterator, getIterator, NULL) - {NULL, NULL, NULL} + ZEND_FE_END }; const zend_function_entry zend_funcs_iterator[] = { @@ -508,7 +508,7 @@ const zend_function_entry zend_funcs_iterator[] = { ZEND_ABSTRACT_ME(iterator, key, NULL) ZEND_ABSTRACT_ME(iterator, valid, NULL) ZEND_ABSTRACT_ME(iterator, rewind, NULL) - {NULL, NULL, NULL} + ZEND_FE_END }; const zend_function_entry *zend_funcs_traversable = NULL; @@ -531,7 +531,7 @@ const zend_function_entry zend_funcs_arrayaccess[] = { ZEND_ABSTRACT_ME(arrayaccess, offsetGet, arginfo_arrayaccess_offset_get) ZEND_ABSTRACT_ME(arrayaccess, offsetSet, arginfo_arrayaccess_offset_value) ZEND_ABSTRACT_ME(arrayaccess, offsetUnset, arginfo_arrayaccess_offset) - {NULL, NULL, NULL} + ZEND_FE_END }; ZEND_BEGIN_ARG_INFO(arginfo_serializable_serialize, 0) @@ -541,7 +541,7 @@ ZEND_END_ARG_INFO() const zend_function_entry zend_funcs_serializable[] = { ZEND_ABSTRACT_ME(serializable, serialize, NULL) ZEND_FENTRY(unserialize, NULL, arginfo_serializable_serialize, ZEND_ACC_PUBLIC|ZEND_ACC_ABSTRACT|ZEND_ACC_CTOR) - {NULL, NULL, NULL} + ZEND_FE_END }; /* }}} */ diff --git a/Zend/zend_iterators.c b/Zend/zend_iterators.c index 8edd5dbdc4..8d81eae3b0 100644 --- a/Zend/zend_iterators.c +++ b/Zend/zend_iterators.c @@ -50,7 +50,12 @@ static zend_object_handlers iterator_object_handlers = { NULL, /* get class name */ NULL, /* compare */ NULL, /* cast */ - NULL /* count */ + NULL, /* count */ + NULL, /* get_debug_info */ + NULL, /* get_closure */ + NULL, /* get_gc */ + NULL, /* do_operation */ + NULL /* compare */ }; ZEND_API void zend_register_iterator_wrapper(TSRMLS_D) diff --git a/Zend/zend_virtual_cwd.c b/Zend/zend_virtual_cwd.c index 509b33e369..33bfddc3f9 100644 --- a/Zend/zend_virtual_cwd.c +++ b/Zend/zend_virtual_cwd.c @@ -620,7 +620,7 @@ static inline zend_ulong realpath_cache_key(const char *path, int path_len) /* { CWD_API void realpath_cache_clean(TSRMLS_D) /* {{{ */ { - int i; + uint32_t i; for (i = 0; i < sizeof(CWDG(realpath_cache))/sizeof(CWDG(realpath_cache)[0]); i++) { realpath_cache_bucket *p = CWDG(realpath_cache)[i]; diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 223ecf9a0d..0bf218d581 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -5513,8 +5513,8 @@ ZEND_VM_HANDLER(105, ZEND_TICKS, ANY, ANY) USE_OPLINE SAVE_OPLINE(); - if (++EG(ticks_count)>=opline->extended_value) { - EG(ticks_count)=0; + if ((uint32_t)++EG(ticks_count) >= opline->extended_value) { + EG(ticks_count) = 0; if (zend_ticks_function) { zend_ticks_function(opline->extended_value TSRMLS_CC); } diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 408b59d692..038953ccd4 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -1144,8 +1144,8 @@ static int ZEND_FASTCALL ZEND_TICKS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS) USE_OPLINE SAVE_OPLINE(); - if (++EG(ticks_count)>=opline->extended_value) { - EG(ticks_count)=0; + if ((uint32_t)++EG(ticks_count) >= opline->extended_value) { + EG(ticks_count) = 0; if (zend_ticks_function) { zend_ticks_function(opline->extended_value TSRMLS_CC); } |