From 2e5d0a3a9d21b50df91c02d94ed923f543a0e8ea Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 21 Feb 2006 08:00:39 +0000 Subject: [PATCH] WS --- Zend/zend.h | 8 +- Zend/zend_API.c | 262 ++++++++-------- Zend/zend_API.h | 8 +- Zend/zend_alloc.c | 16 +- Zend/zend_alloc.h | 2 +- Zend/zend_arg_defs.c | 1 - Zend/zend_compile.c | 182 +++++------ Zend/zend_compile.h | 12 +- Zend/zend_config.nw.h | 4 +- Zend/zend_config.w32.h | 4 +- Zend/zend_constants.c | 28 +- Zend/zend_constants.h | 2 +- Zend/zend_dynamic_array.c | 2 +- Zend/zend_dynamic_array.h | 2 +- Zend/zend_errors.h | 2 +- Zend/zend_exceptions.c | 44 +-- Zend/zend_exceptions.h | 4 +- Zend/zend_execute.c | 76 ++--- Zend/zend_execute.h | 4 +- Zend/zend_execute_API.c | 38 +-- Zend/zend_extensions.c | 18 +- Zend/zend_extensions.h | 4 +- Zend/zend_fast_cache.h | 2 +- Zend/zend_globals_macros.h | 2 +- Zend/zend_hash.c | 4 +- Zend/zend_hash.h | 4 +- Zend/zend_highlight.c | 11 +- Zend/zend_highlight.h | 2 +- Zend/zend_indent.c | 2 +- Zend/zend_indent.h | 2 +- Zend/zend_ini.c | 22 +- Zend/zend_ini.h | 2 +- Zend/zend_interfaces.c | 26 +- Zend/zend_interfaces.h | 2 +- Zend/zend_istdiostream.h | 2 +- Zend/zend_iterators.c | 10 +- Zend/zend_iterators.h | 6 +- Zend/zend_language_scanner.h | 4 +- Zend/zend_language_scanner.l | 8 +- Zend/zend_list.c | 20 +- Zend/zend_list.h | 2 +- Zend/zend_llist.c | 6 +- Zend/zend_llist.h | 2 +- Zend/zend_mm.c | 18 +- Zend/zend_modules.h | 2 +- Zend/zend_object_handlers.c | 56 ++-- Zend/zend_object_handlers.h | 2 +- Zend/zend_objects.c | 26 +- Zend/zend_objects.h | 2 +- Zend/zend_objects_API.c | 18 +- Zend/zend_objects_API.h | 2 +- Zend/zend_opcode.c | 12 +- Zend/zend_operators.c | 106 +++---- Zend/zend_operators.h | 16 +- Zend/zend_ptr_stack.c | 6 +- Zend/zend_ptr_stack.h | 2 +- Zend/zend_qsort.c | 12 +- Zend/zend_qsort.h | 2 +- Zend/zend_sprintf.c | 2 +- Zend/zend_stack.c | 2 +- Zend/zend_stack.h | 2 +- Zend/zend_stream.c | 20 +- Zend/zend_stream.h | 3 +- Zend/zend_strtod.c | 6 +- Zend/zend_strtod.h | 2 +- Zend/zend_ts_hash.c | 2 +- Zend/zend_ts_hash.h | 2 +- Zend/zend_unicode.c | 12 +- Zend/zend_unicode.h | 2 +- Zend/zend_variables.c | 4 +- Zend/zend_variables.h | 2 +- Zend/zend_vm_def.h | 28 +- Zend/zend_vm_execute.h | 584 +++++++++++++++++------------------ Zend/zend_vm_execute.skl | 2 +- Zend/zend_vm_gen.php | 19 +- 75 files changed, 920 insertions(+), 920 deletions(-) diff --git a/Zend/zend.h b/Zend/zend.h index 7310ed1593..de279083e6 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | @@ -328,7 +328,7 @@ struct _zend_class_entry { char type; char *name; zend_uint name_length; - struct _zend_class_entry *parent; + struct _zend_class_entry *parent; int refcount; zend_bool constants_updated; zend_uint ce_flags; @@ -393,7 +393,7 @@ typedef struct _zend_utility_functions { char *(*getenv_function)(char *name, size_t name_len TSRMLS_DC); } zend_utility_functions; - + typedef struct _zend_utility_values { char *import_use_extension; uint import_use_extension_length; @@ -576,7 +576,7 @@ END_EXTERN_C() #define INIT_PZVAL(z) \ (z)->refcount = 1; \ - (z)->is_ref = 0; + (z)->is_ref = 0; #define INIT_ZVAL(z) z = zval_used_for_init; diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 21039ecca6..171df36ac2 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | @@ -159,7 +159,7 @@ ZEND_API int _zend_get_parameters_array_ex(int param_count, zval ***argument_arr char *class_name; zend_uint class_name_len; int dup; - + dup = zend_get_object_classname(*value, &class_name, &class_name_len TSRMLS_CC); ALLOC_ZVAL(value_ptr); @@ -196,7 +196,7 @@ ZEND_API int zend_copy_parameters_array(int param_count, zval *argument_array TS while (param_count-->0) { zval **param = (zval **) p-(arg_count--); zval_add_ref(param); - add_next_index_zval(argument_array, *param); + add_next_index_zval(argument_array, *param); } return SUCCESS; @@ -207,7 +207,7 @@ ZEND_API void zend_wrong_param_count(TSRMLS_D) { char *space; char *class_name = get_active_class_name(&space TSRMLS_CC); - + zend_error(E_WARNING, "Wrong parameter count for %v%s%v()", class_name, space, get_active_function_name(TSRMLS_C)); } @@ -265,7 +265,7 @@ ZEND_API int zend_get_object_classname(zval *object, char **class_name, zend_uin if (Z_OBJ_HT_P(object)->get_class_name == NULL || Z_OBJ_HT_P(object)->get_class_name(object, class_name, class_name_len, 0 TSRMLS_CC) != SUCCESS) { zend_class_entry *ce = Z_OBJCE_P(object); - + *class_name = ce->name; *class_name_len = ce->name_length; return 1; @@ -276,7 +276,7 @@ ZEND_API int zend_get_object_classname(zval *object, char **class_name, zend_uin #define RETURN_AS_STRING(arg, p, pl, type) \ *(char**)p = Z_STRVAL_PP(arg); \ *pl = Z_STRLEN_PP(arg); \ - *type = IS_STRING; + *type = IS_STRING; #define RETURN_AS_UNICODE(arg, p, pl, type) \ *(UChar**)p = Z_USTRVAL_PP(arg); \ @@ -428,7 +428,7 @@ static char *zend_parse_arg_impl(int arg_num, zval **arg, va_list *va, char **sp } } } - + case IS_ARRAY: case IS_RESOURCE: default: @@ -472,7 +472,7 @@ static char *zend_parse_arg_impl(int arg_num, zval **arg, va_list *va, char **sp } } } - + case IS_ARRAY: case IS_RESOURCE: default: @@ -531,7 +531,7 @@ static char *zend_parse_arg_impl(int arg_num, zval **arg, va_list *va, char **sp } } } - + case IS_ARRAY: case IS_RESOURCE: default: @@ -593,7 +593,7 @@ static char *zend_parse_arg_impl(int arg_num, zval **arg, va_list *va, char **sp } } } - + case IS_ARRAY: case IS_RESOURCE: default: @@ -722,7 +722,7 @@ static char *zend_parse_arg_impl(int arg_num, zval **arg, va_list *va, char **sp char *space; char *class_name = get_active_class_name(&space TSRMLS_CC); zend_error(E_WARNING, "%v%s%v() expects parameter %d to be a class name derived from %v, '%v' given", - class_name, space, get_active_function_name(TSRMLS_C), + class_name, space, get_active_function_name(TSRMLS_C), arg_num, ce_base->name, Z_STRVAL_PP(arg)); *pce = NULL; return ""; @@ -732,12 +732,12 @@ static char *zend_parse_arg_impl(int arg_num, zval **arg, va_list *va, char **sp char *space; char *class_name = get_active_class_name(&space TSRMLS_CC); zend_error(E_WARNING, "%v%s%v() expects parameter %d to be a valid class name, '%v' given", - class_name, space, get_active_function_name(TSRMLS_C), + class_name, space, get_active_function_name(TSRMLS_C), arg_num, Z_STRVAL_PP(arg)); return ""; } break; - + } break; @@ -786,7 +786,7 @@ static int zend_parse_arg(int arg_num, zval **arg, va_list *va, char **spec, int } return FAILURE; } - + return SUCCESS; } @@ -833,7 +833,7 @@ static int zend_parse_va_args(int num_args, char *type_spec, va_list *va, int fl if (!quiet) { char *space; char *class_name = get_active_class_name(&space TSRMLS_CC); - zend_error(E_WARNING, "%v%s%v(): bad type specifier while parsing parameters", + zend_error(E_WARNING, "%v%s%v(): bad type specifier while parsing parameters", class_name, space, get_active_function_name(TSRMLS_C)); } @@ -883,7 +883,7 @@ static int zend_parse_va_args(int num_args, char *type_spec, va_list *va, int fl } i++; break; - + case '|': case '!': case '/': /* pass */ @@ -915,7 +915,7 @@ ZEND_API int zend_parse_parameters_ex(int flags, int num_args TSRMLS_DC, char *t { va_list va; int retval; - + va_start(va, type_spec); retval = zend_parse_va_args(num_args, type_spec, &va, flags TSRMLS_CC); va_end(va); @@ -927,7 +927,7 @@ ZEND_API int zend_parse_parameters(int num_args TSRMLS_DC, char *type_spec, ...) { va_list va; int retval; - + va_start(va, type_spec); retval = zend_parse_va_args(num_args, type_spec, &va, 0 TSRMLS_CC); va_end(va); @@ -1039,7 +1039,7 @@ static int zend_merge_property(zval **value, int num_args, va_list args, zend_ha } -/* This function should be called after the constructor has been called +/* This function should be called after the constructor has been called * because it may call __set from the uninitialized object otherwise. */ ZEND_API void zend_merge_properties(zval *obj, HashTable *properties, int destroy_ht TSRMLS_DC) { @@ -1107,7 +1107,7 @@ ZEND_API void zend_update_class_constants(zend_class_entry *class_type TSRMLS_DC zend_u_hash_add(CE_STATIC_MEMBERS(class_type), utype, str_index, str_length, (void**)q, sizeof(zval*), NULL); } else { zval *q; - + ALLOC_ZVAL(q); *q = **p; INIT_PZVAL(q); @@ -1118,7 +1118,7 @@ ZEND_API void zend_update_class_constants(zend_class_entry *class_type TSRMLS_DC } } zend_hash_apply_with_argument(CE_STATIC_MEMBERS(class_type), (apply_func_arg_t) zval_update_constant, (void *) 1 TSRMLS_CC); - + *scope = old_scope; class_type->constants_updated = 1; } @@ -1126,7 +1126,7 @@ ZEND_API void zend_update_class_constants(zend_class_entry *class_type TSRMLS_DC /* This function requires 'properties' to contain all props declared in the - * class and all props being public. If only a subset is given or the class + * class and all props being public. If only a subset is given or the class * has protected members then you need to merge the properties seperately by * calling zend_merge_properties(). */ ZEND_API int _object_and_properties_init(zval *arg, zend_class_entry *class_type, HashTable *properties ZEND_FILE_LINE_DC TSRMLS_DC) @@ -1140,7 +1140,7 @@ ZEND_API int _object_and_properties_init(zval *arg, zend_class_entry *class_type } zend_update_class_constants(class_type TSRMLS_CC); - + Z_TYPE_P(arg) = IS_OBJECT; if (class_type->create_object == NULL) { Z_OBJVAL_P(arg) = zend_objects_new(&object, class_type TSRMLS_CC); @@ -1181,24 +1181,24 @@ ZEND_API int add_assoc_long_ex(zval *arg, char *key, uint key_len, long n) MAKE_STD_ZVAL(tmp); ZVAL_LONG(tmp, n); - + return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL); } ZEND_API int add_assoc_null_ex(zval *arg, char *key, uint key_len) { zval *tmp; - + MAKE_STD_ZVAL(tmp); ZVAL_NULL(tmp); - + return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL); } ZEND_API int add_assoc_bool_ex(zval *arg, char *key, uint key_len, int b) { zval *tmp; - + MAKE_STD_ZVAL(tmp); ZVAL_BOOL(tmp, b); @@ -1208,10 +1208,10 @@ ZEND_API int add_assoc_bool_ex(zval *arg, char *key, uint key_len, int b) ZEND_API int add_assoc_resource_ex(zval *arg, char *key, uint key_len, int r) { zval *tmp; - + MAKE_STD_ZVAL(tmp); ZVAL_RESOURCE(tmp, r); - + return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL); } @@ -1219,7 +1219,7 @@ ZEND_API int add_assoc_resource_ex(zval *arg, char *key, uint key_len, int r) ZEND_API int add_assoc_double_ex(zval *arg, char *key, uint key_len, double d) { zval *tmp; - + MAKE_STD_ZVAL(tmp); ZVAL_DOUBLE(tmp, d); @@ -1230,7 +1230,7 @@ ZEND_API int add_assoc_double_ex(zval *arg, char *key, uint key_len, double d) ZEND_API int add_assoc_string_ex(zval *arg, char *key, uint key_len, char *str, int duplicate) { zval *tmp; - + MAKE_STD_ZVAL(tmp); ZVAL_STRING(tmp, str, duplicate); @@ -1241,7 +1241,7 @@ ZEND_API int add_assoc_string_ex(zval *arg, char *key, uint key_len, char *str, ZEND_API int add_assoc_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, int duplicate) { zval *tmp; - + MAKE_STD_ZVAL(tmp); ZVAL_STRINGL(tmp, str, length, duplicate); @@ -1251,7 +1251,7 @@ ZEND_API int add_assoc_stringl_ex(zval *arg, char *key, uint key_len, char *str, ZEND_API int add_assoc_unicode_ex(zval *arg, char *key, uint key_len, void *str, int duplicate) { zval *tmp; - + MAKE_STD_ZVAL(tmp); ZVAL_UNICODE(tmp, str, duplicate); @@ -1262,7 +1262,7 @@ ZEND_API int add_assoc_unicode_ex(zval *arg, char *key, uint key_len, void *str, ZEND_API int add_assoc_unicodel_ex(zval *arg, char *key, uint key_len, void *str, uint length, int duplicate) { zval *tmp; - + MAKE_STD_ZVAL(tmp); ZVAL_UNICODEL(tmp, str, length, duplicate); @@ -1303,10 +1303,10 @@ ZEND_API int add_index_null(zval *arg, ulong index) ZEND_API int add_index_bool(zval *arg, ulong index, int b) { zval *tmp; - + MAKE_STD_ZVAL(tmp); ZVAL_BOOL(tmp, b); - + return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL); } @@ -1314,10 +1314,10 @@ ZEND_API int add_index_bool(zval *arg, ulong index, int b) ZEND_API int add_index_resource(zval *arg, ulong index, int r) { zval *tmp; - + MAKE_STD_ZVAL(tmp); ZVAL_RESOURCE(tmp, r); - + return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL); } @@ -1325,10 +1325,10 @@ ZEND_API int add_index_resource(zval *arg, ulong index, int r) ZEND_API int add_index_double(zval *arg, ulong index, double d) { zval *tmp; - + MAKE_STD_ZVAL(tmp); ZVAL_DOUBLE(tmp, d); - + return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL); } @@ -1336,7 +1336,7 @@ ZEND_API int add_index_double(zval *arg, ulong index, double d) ZEND_API int add_index_string(zval *arg, ulong index, char *str, int duplicate) { zval *tmp; - + MAKE_STD_ZVAL(tmp); ZVAL_STRING(tmp, str, duplicate); @@ -1347,10 +1347,10 @@ ZEND_API int add_index_string(zval *arg, ulong index, char *str, int duplicate) ZEND_API int add_index_stringl(zval *arg, ulong index, char *str, uint length, int duplicate) { zval *tmp; - + MAKE_STD_ZVAL(tmp); ZVAL_STRINGL(tmp, str, length, duplicate); - + return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL); } @@ -1358,7 +1358,7 @@ ZEND_API int add_index_stringl(zval *arg, ulong index, char *str, uint length, i ZEND_API int add_index_unicode(zval *arg, ulong index, UChar *str, int duplicate) { zval *tmp; - + MAKE_STD_ZVAL(tmp); ZVAL_UNICODE(tmp, str, duplicate); @@ -1369,10 +1369,10 @@ ZEND_API int add_index_unicode(zval *arg, ulong index, UChar *str, int duplicate ZEND_API int add_index_unicodel(zval *arg, ulong index, UChar *str, uint length, int duplicate) { zval *tmp; - + MAKE_STD_ZVAL(tmp); ZVAL_UNICODEL(tmp, str, length, duplicate); - + return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL); } @@ -1386,10 +1386,10 @@ ZEND_API int add_index_zval(zval *arg, ulong index, zval *value) ZEND_API int add_next_index_long(zval *arg, long n) { zval *tmp; - + MAKE_STD_ZVAL(tmp); ZVAL_LONG(tmp, n); - + return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL); } @@ -1397,10 +1397,10 @@ ZEND_API int add_next_index_long(zval *arg, long n) ZEND_API int add_next_index_null(zval *arg) { zval *tmp; - + MAKE_STD_ZVAL(tmp); ZVAL_NULL(tmp); - + return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL); } @@ -1408,10 +1408,10 @@ ZEND_API int add_next_index_null(zval *arg) ZEND_API int add_next_index_bool(zval *arg, int b) { zval *tmp; - + MAKE_STD_ZVAL(tmp); ZVAL_BOOL(tmp, b); - + return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL); } @@ -1419,10 +1419,10 @@ ZEND_API int add_next_index_bool(zval *arg, int b) ZEND_API int add_next_index_resource(zval *arg, int r) { zval *tmp; - + MAKE_STD_ZVAL(tmp); ZVAL_RESOURCE(tmp, r); - + return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL); } @@ -1430,10 +1430,10 @@ ZEND_API int add_next_index_resource(zval *arg, int r) ZEND_API int add_next_index_double(zval *arg, double d) { zval *tmp; - + MAKE_STD_ZVAL(tmp); ZVAL_DOUBLE(tmp, d); - + return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL); } @@ -1491,10 +1491,10 @@ ZEND_API int add_next_index_zval(zval *arg, zval *value) ZEND_API int add_get_assoc_string_ex(zval *arg, char *key, uint key_len, char *str, void **dest, int duplicate) { zval *tmp; - + MAKE_STD_ZVAL(tmp); ZVAL_STRING(tmp, str, duplicate); - + return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), dest); } @@ -1502,7 +1502,7 @@ ZEND_API int add_get_assoc_string_ex(zval *arg, char *key, uint key_len, char *s ZEND_API int add_get_assoc_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, void **dest, int duplicate) { zval *tmp; - + MAKE_STD_ZVAL(tmp); ZVAL_STRINGL(tmp, str, length, duplicate); @@ -1513,10 +1513,10 @@ ZEND_API int add_get_assoc_stringl_ex(zval *arg, char *key, uint key_len, char * ZEND_API int add_get_index_long(zval *arg, ulong index, long l, void **dest) { zval *tmp; - + MAKE_STD_ZVAL(tmp); ZVAL_LONG(tmp, l); - + return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), dest); } @@ -1524,10 +1524,10 @@ ZEND_API int add_get_index_long(zval *arg, ulong index, long l, void **dest) ZEND_API int add_get_index_double(zval *arg, ulong index, double d, void **dest) { zval *tmp; - + MAKE_STD_ZVAL(tmp); ZVAL_DOUBLE(tmp, d); - + return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), dest); } @@ -1535,10 +1535,10 @@ ZEND_API int add_get_index_double(zval *arg, ulong index, double d, void **dest) ZEND_API int add_get_index_string(zval *arg, ulong index, char *str, void **dest, int duplicate) { zval *tmp; - + MAKE_STD_ZVAL(tmp); ZVAL_STRING(tmp, str, duplicate); - + return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), dest); } @@ -1546,20 +1546,20 @@ ZEND_API int add_get_index_string(zval *arg, ulong index, char *str, void **dest ZEND_API int add_get_index_stringl(zval *arg, ulong index, char *str, uint length, void **dest, int duplicate) { zval *tmp; - + MAKE_STD_ZVAL(tmp); ZVAL_STRINGL(tmp, str, length, duplicate); - + return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), dest); } ZEND_API int add_get_index_unicode(zval *arg, ulong index, UChar *str, void **dest, int duplicate) { zval *tmp; - + MAKE_STD_ZVAL(tmp); ZVAL_UNICODE(tmp, str, duplicate); - + return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), dest); } @@ -1567,10 +1567,10 @@ ZEND_API int add_get_index_unicode(zval *arg, ulong index, UChar *str, void **de ZEND_API int add_get_index_unicodel(zval *arg, ulong index, UChar *str, uint length, void **dest, int duplicate) { zval *tmp; - + MAKE_STD_ZVAL(tmp); ZVAL_UNICODEL(tmp, str, length, duplicate); - + return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), dest); } @@ -1581,7 +1581,7 @@ ZEND_API int add_property_long_ex(zval *arg, char *key, uint key_len, long n TSR MAKE_STD_ZVAL(tmp); ZVAL_LONG(tmp, n); - + MAKE_STD_ZVAL(z_key); ZVAL_ASCII_STRINGL(z_key, key, key_len-1, 1); @@ -1612,10 +1612,10 @@ ZEND_API int add_property_null_ex(zval *arg, char *key, uint key_len TSRMLS_DC) { zval *tmp; zval *z_key; - + MAKE_STD_ZVAL(tmp); ZVAL_NULL(tmp); - + MAKE_STD_ZVAL(z_key); ZVAL_ASCII_STRINGL(z_key, key, key_len-1, 1); @@ -1629,7 +1629,7 @@ ZEND_API int add_property_resource_ex(zval *arg, char *key, uint key_len, long n { zval *tmp; zval *z_key; - + MAKE_STD_ZVAL(tmp); ZVAL_RESOURCE(tmp, n); @@ -1650,7 +1650,7 @@ ZEND_API int add_property_double_ex(zval *arg, char *key, uint key_len, double d MAKE_STD_ZVAL(tmp); ZVAL_DOUBLE(tmp, d); - + MAKE_STD_ZVAL(z_key); ZVAL_ASCII_STRINGL(z_key, key, key_len-1, 1); @@ -1837,7 +1837,7 @@ ZEND_API int zend_startup_module_ex(zend_module_entry *module TSRMLS_DC) zend_error(E_CORE_WARNING, "Cannot load module '%s' because required module '%s' is not loaded", module->name, dep->name); module->module_started = 0; return FAILURE; - } + } efree(lcname); } ++dep; @@ -1861,7 +1861,7 @@ static void zend_sort_modules(void *base, size_t count, size_t siz, compare_func Bucket **b1 = base; Bucket **b2; Bucket **end = b1 + count; - Bucket *tmp; + Bucket *tmp; zend_module_entry *m, *r; while (b1 < end) { @@ -1877,14 +1877,14 @@ try_again: if (strcasecmp(dep->name, r->name) == 0) { tmp = *b1; *b1 = *b2; - *b2 = tmp; + *b2 = tmp; goto try_again; } b2++; } } dep++; - } + } } b1++; } @@ -1902,7 +1902,7 @@ ZEND_API zend_module_entry* zend_register_module_ex(zend_module_entry *module TS int name_len; char *lcname; zend_module_entry *module_ptr; - + if (!module) { return NULL; } @@ -1925,7 +1925,7 @@ ZEND_API zend_module_entry* zend_register_module_ex(zend_module_entry *module TS /* TODO: Check version relationship */ zend_error(E_CORE_WARNING, "Cannot load module '%s' because conflicting module '%s' is already loaded", module->name, dep->name); return NULL; - } + } efree(lcname); } ++dep; @@ -1968,7 +1968,7 @@ ZEND_API void zend_check_magic_method_implementation(zend_class_entry *ce, zend_ int name_len; zend_uchar utype = UG(unicode)?IS_UNICODE:IS_STRING; - /* we don't care if the function name is longer, in fact lowercasing only + /* we don't care if the function name is longer, in fact lowercasing only * the beginning of the name speeds up the check process */ if (UG(unicode)) { name_len = u_strlen((UChar*)fptr->common.function_name); @@ -1977,7 +1977,7 @@ ZEND_API void zend_check_magic_method_implementation(zend_class_entry *ce, zend_ } lcname = zend_u_str_case_fold(utype, fptr->common.function_name, name_len, 0, &lcname_len); - if (lcname_len == sizeof(ZEND_DESTRUCTOR_FUNC_NAME) - 1 && + if (lcname_len == sizeof(ZEND_DESTRUCTOR_FUNC_NAME) - 1 && ZEND_U_EQUAL(utype, lcname, lcname_len, ZEND_DESTRUCTOR_FUNC_NAME, sizeof(ZEND_DESTRUCTOR_FUNC_NAME)-1) && fptr->common.num_args != 0) { zend_error(error_type, "Destuctor %v::%s() cannot take arguments", ce->name, ZEND_DESTRUCTOR_FUNC_NAME); } else if (lcname_len == sizeof(ZEND_CLONE_FUNC_NAME) - 1 && @@ -2231,7 +2231,7 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, zend_function_entr return SUCCESS; } -/* count=-1 means erase all functions, otherwise, +/* count=-1 means erase all functions, otherwise, * erase the first count functions */ ZEND_API void zend_unregister_functions(zend_function_entry *functions, int count, HashTable *function_table TSRMLS_DC) @@ -2260,7 +2260,7 @@ ZEND_API void zend_unregister_functions(zend_function_entry *functions, int coun ZEND_API int zend_startup_module(zend_module_entry *module) { TSRMLS_FETCH(); - + if ((module = zend_register_internal_module(module TSRMLS_CC)) != NULL && zend_startup_module_ex(module TSRMLS_CC) == SUCCESS) { return SUCCESS; @@ -2272,7 +2272,7 @@ ZEND_API int zend_startup_module(zend_module_entry *module) ZEND_API int zend_get_module_started(char *module_name) { zend_module_entry *module; - + return (zend_hash_find(&module_registry, module_name, strlen(module_name)+1, (void**)&module) == SUCCESS && module->module_started) ? SUCCESS : FAILURE; } @@ -2410,7 +2410,7 @@ ZEND_API void zend_class_implements(zend_class_entry *class_entry TSRMLS_DC, int } else { class_entry->interfaces = erealloc(class_entry->interfaces, sizeof(zend_class_entry*) * (class_entry->num_interfaces+num_interfaces)); } - + while (num_interfaces--) { interface_entry = va_arg(interface_list, zend_class_entry *); class_entry->interfaces[class_entry->num_interfaces++] = interface_entry; @@ -2499,7 +2499,7 @@ ZEND_API int zend_disable_class(char *class_name, uint class_name_length TSRMLS_ { zend_class_entry *disabled_class; disabled_class = (zend_class_entry *) emalloc(sizeof(zend_class_entry)); - + zend_str_tolower(class_name, class_name_length); if (zend_hash_del(CG(class_table), class_name, class_name_length+1)==FAILURE) { return FAILURE; @@ -2518,7 +2518,7 @@ static int zend_is_callable_check_func(int check_flags, zval ***zobj_ptr_ptr, ze zend_function *fptr; zend_class_entry **pce; HashTable *ftable; - + *ce_ptr = NULL; *fptr_ptr = NULL; @@ -2632,7 +2632,7 @@ ZEND_API zend_bool zend_is_callable_ex(zval *callable, uint check_flags, zval *c if (check_flags & IS_CALLABLE_CHECK_SYNTAX_ONLY) { return 1; } - + return zend_is_callable_check_func(check_flags|IS_CALLABLE_CHECK_IS_STATIC, zobj_ptr_ptr, NULL, callable, ce_ptr, fptr_ptr TSRMLS_CC); case IS_ARRAY: @@ -2640,7 +2640,7 @@ ZEND_API zend_bool zend_is_callable_ex(zval *callable, uint check_flags, zval *c zend_class_entry *ce = NULL; zval **method; zval **obj; - + if (zend_hash_num_elements(Z_ARRVAL_P(callable)) == 2 && zend_hash_index_find(Z_ARRVAL_P(callable), 0, (void **) &obj) == SUCCESS && zend_hash_index_find(Z_ARRVAL_P(callable), 1, (void **) &method) == SUCCESS && @@ -2727,7 +2727,7 @@ ZEND_API zend_bool zend_is_callable_ex(zval *callable, uint check_flags, zval *c efree(lcname); } else { ce = Z_OBJCE_PP(obj); /* TBFixed: what if it's overloaded? */ - + *zobj_ptr_ptr = obj; if (callable_name) { @@ -2816,7 +2816,7 @@ ZEND_API zend_bool zend_make_callable(zval *callable, zval *callable_name TSRMLS switch (Z_TYPE_P(callable)) { case IS_STRING: lcname = zend_str_tolower_dup(Z_STRVAL_P(callable), Z_STRLEN_P(callable)); - + if ((func = strstr(lcname, "::")) != NULL) { *func = '\0'; class_name_len = func - lcname; @@ -2827,7 +2827,7 @@ ZEND_API zend_bool zend_make_callable(zval *callable, zval *callable_name TSRMLS add_next_index_stringl(callable, lcname, class_name_len, 1); func += 2; add_next_index_stringl(callable, func, strlen(func), 1); - retval = 1; + retval = 1; } efree(class_name); } @@ -2905,8 +2905,8 @@ ZEND_API int zend_u_declare_property_ex(zend_class_entry *ce, zend_uchar type, v pefree(prot_name, ce->type & ZEND_INTERNAL_CLASS); } zend_u_hash_update(target_symbol_table, type, name, name_length+1, &property, sizeof(zval *), NULL); - property_info.name = ce->type & ZEND_INTERNAL_CLASS ? - (type==IS_UNICODE?(char*)zend_ustrndup(name, name_length):zend_strndup(name, name_length)) : + property_info.name = ce->type & ZEND_INTERNAL_CLASS ? + (type==IS_UNICODE?(char*)zend_ustrndup(name, name_length):zend_strndup(name, name_length)) : (type==IS_UNICODE?(char*)eustrndup(name, name_length):estrndup(name, name_length)); property_info.name_length = name_length; break; @@ -2916,7 +2916,7 @@ ZEND_API int zend_u_declare_property_ex(zend_class_entry *ce, zend_uchar type, v property_info.doc_comment = doc_comment; property_info.doc_comment_len = doc_comment_len; - + zend_u_hash_update(&ce->properties_info, type, name, name_length + 1, &property_info, sizeof(zend_property_info), NULL); return SUCCESS; @@ -2940,7 +2940,7 @@ ZEND_API int zend_declare_property(zend_class_entry *ce, char *name, int name_le ZEND_API int zend_declare_property_null(zend_class_entry *ce, char *name, int name_length, int access_type TSRMLS_DC) { zval *property; - + if (ce->type & ZEND_INTERNAL_CLASS) { property = malloc(sizeof(zval)); } else { @@ -2953,7 +2953,7 @@ ZEND_API int zend_declare_property_null(zend_class_entry *ce, char *name, int na ZEND_API int zend_declare_property_bool(zend_class_entry *ce, char *name, int name_length, long value, int access_type TSRMLS_DC) { zval *property; - + if (ce->type & ZEND_INTERNAL_CLASS) { property = malloc(sizeof(zval)); } else { @@ -2967,7 +2967,7 @@ ZEND_API int zend_declare_property_bool(zend_class_entry *ce, char *name, int na ZEND_API int zend_declare_property_long(zend_class_entry *ce, char *name, int name_length, long value, int access_type TSRMLS_DC) { zval *property; - + if (ce->type & ZEND_INTERNAL_CLASS) { property = malloc(sizeof(zval)); } else { @@ -2981,7 +2981,7 @@ ZEND_API int zend_declare_property_long(zend_class_entry *ce, char *name, int na ZEND_API int zend_declare_property_double(zend_class_entry *ce, char *name, int name_length, double value, int access_type TSRMLS_DC) { zval *property; - + if (ce->type & ZEND_INTERNAL_CLASS) { property = malloc(sizeof(zval)); } else { @@ -2996,7 +2996,7 @@ ZEND_API int zend_declare_property_string(zend_class_entry *ce, char *name, int { zval *property; int len = strlen(value); - + if (ce->type & ZEND_INTERNAL_CLASS) { property = malloc(sizeof(zval)); ZVAL_STRINGL(property, zend_strndup(value, len), len, 0); @@ -3011,7 +3011,7 @@ ZEND_API int zend_declare_property_string(zend_class_entry *ce, char *name, int ZEND_API int zend_declare_property_stringl(zend_class_entry *ce, char *name, int name_length, char *value, int value_len, int access_type TSRMLS_DC) { zval *property; - + if (ce->type & ZEND_INTERNAL_CLASS) { property = malloc(sizeof(zval)); ZVAL_STRINGL(property, zend_strndup(value, value_len), value_len, 0); @@ -3094,7 +3094,7 @@ ZEND_API void zend_update_property(zend_class_entry *scope, zval *object, char * { zval *property; zend_class_entry *old_scope = EG(scope); - + EG(scope) = scope; if (!Z_OBJ_HT_P(object)->write_property) { @@ -3102,7 +3102,7 @@ ZEND_API void zend_update_property(zend_class_entry *scope, zval *object, char * zend_uint class_name_len; zend_get_object_classname(object, &class_name, &class_name_len TSRMLS_CC); - + zend_error(E_CORE_ERROR, "Property %s of class %v cannot be updated", name, class_name); } MAKE_STD_ZVAL(property); @@ -3127,7 +3127,7 @@ ZEND_API void zend_update_property_null(zend_class_entry *scope, zval *object, c ZEND_API void zend_update_property_bool(zend_class_entry *scope, zval *object, char *name, int name_length, long value TSRMLS_DC) { zval *tmp; - + ALLOC_ZVAL(tmp); tmp->is_ref = 0; tmp->refcount = 0; @@ -3138,7 +3138,7 @@ ZEND_API void zend_update_property_bool(zend_class_entry *scope, zval *object, c ZEND_API void zend_update_property_long(zend_class_entry *scope, zval *object, char *name, int name_length, long value TSRMLS_DC) { zval *tmp; - + ALLOC_ZVAL(tmp); tmp->is_ref = 0; tmp->refcount = 0; @@ -3149,7 +3149,7 @@ ZEND_API void zend_update_property_long(zend_class_entry *scope, zval *object, c ZEND_API void zend_update_property_double(zend_class_entry *scope, zval *object, char *name, int name_length, double value TSRMLS_DC) { zval *tmp; - + ALLOC_ZVAL(tmp); tmp->is_ref = 0; tmp->refcount = 0; @@ -3160,7 +3160,7 @@ ZEND_API void zend_update_property_double(zend_class_entry *scope, zval *object, ZEND_API void zend_update_property_string(zend_class_entry *scope, zval *object, char *name, int name_length, char *value TSRMLS_DC) { zval *tmp; - + ALLOC_ZVAL(tmp); tmp->is_ref = 0; tmp->refcount = 0; @@ -3171,7 +3171,7 @@ ZEND_API void zend_update_property_string(zend_class_entry *scope, zval *object, ZEND_API void zend_update_property_stringl(zend_class_entry *scope, zval *object, char *name, int name_length, char *value, int value_len TSRMLS_DC) { zval *tmp; - + ALLOC_ZVAL(tmp); tmp->is_ref = 0; tmp->refcount = 0; @@ -3182,7 +3182,7 @@ ZEND_API void zend_update_property_stringl(zend_class_entry *scope, zval *object ZEND_API void zend_update_property_ascii_string(zend_class_entry *scope, zval *object, char *name, int name_length, char *value TSRMLS_DC) { zval *tmp; - + ALLOC_ZVAL(tmp); tmp->is_ref = 0; tmp->refcount = 0; @@ -3193,7 +3193,7 @@ ZEND_API void zend_update_property_ascii_string(zend_class_entry *scope, zval *o ZEND_API void zend_update_property_ascii_stringl(zend_class_entry *scope, zval *object, char *name, int name_length, char *value, int value_len TSRMLS_DC) { zval *tmp; - + ALLOC_ZVAL(tmp); tmp->is_ref = 0; tmp->refcount = 0; @@ -3204,7 +3204,7 @@ ZEND_API void zend_update_property_ascii_stringl(zend_class_entry *scope, zval * ZEND_API void zend_update_property_rt_string(zend_class_entry *scope, zval *object, char *name, int name_length, char *value TSRMLS_DC) { zval *tmp; - + ALLOC_ZVAL(tmp); tmp->is_ref = 0; tmp->refcount = 0; @@ -3215,7 +3215,7 @@ ZEND_API void zend_update_property_rt_string(zend_class_entry *scope, zval *obje ZEND_API void zend_update_property_rt_stringl(zend_class_entry *scope, zval *object, char *name, int name_length, char *value, int value_len TSRMLS_DC) { zval *tmp; - + ALLOC_ZVAL(tmp); tmp->is_ref = 0; tmp->refcount = 0; @@ -3226,7 +3226,7 @@ ZEND_API void zend_update_property_rt_stringl(zend_class_entry *scope, zval *obj ZEND_API void zend_update_property_unicode(zend_class_entry *scope, zval *object, char *name, int name_length, UChar *value TSRMLS_DC) { zval *tmp; - + ALLOC_ZVAL(tmp); tmp->is_ref = 0; tmp->refcount = 0; @@ -3237,7 +3237,7 @@ ZEND_API void zend_update_property_unicode(zend_class_entry *scope, zval *object ZEND_API void zend_update_property_unicodel(zend_class_entry *scope, zval *object, char *name, int name_length, UChar *value, int value_len TSRMLS_DC) { zval *tmp; - + ALLOC_ZVAL(tmp); tmp->is_ref = 0; tmp->refcount = 0; @@ -3249,7 +3249,7 @@ ZEND_API int zend_update_static_property(zend_class_entry *scope, char *name, in { zval **property; zend_class_entry *old_scope = EG(scope); - + EG(scope) = scope; property = zend_std_get_static_property(scope, IS_STRING, name, name_length, 0 TSRMLS_CC); EG(scope) = old_scope; @@ -3293,7 +3293,7 @@ ZEND_API int zend_update_static_property_null(zend_class_entry *scope, char *nam ZEND_API int zend_update_static_property_bool(zend_class_entry *scope, char *name, int name_length, long value TSRMLS_DC) { zval *tmp; - + ALLOC_ZVAL(tmp); tmp->is_ref = 0; tmp->refcount = 0; @@ -3304,7 +3304,7 @@ ZEND_API int zend_update_static_property_bool(zend_class_entry *scope, char *nam ZEND_API int zend_update_static_property_long(zend_class_entry *scope, char *name, int name_length, long value TSRMLS_DC) { zval *tmp; - + ALLOC_ZVAL(tmp); tmp->is_ref = 0; tmp->refcount = 0; @@ -3315,7 +3315,7 @@ ZEND_API int zend_update_static_property_long(zend_class_entry *scope, char *nam ZEND_API int zend_update_static_property_double(zend_class_entry *scope, char *name, int name_length, double value TSRMLS_DC) { zval *tmp; - + ALLOC_ZVAL(tmp); tmp->is_ref = 0; tmp->refcount = 0; @@ -3326,7 +3326,7 @@ ZEND_API int zend_update_static_property_double(zend_class_entry *scope, char *n ZEND_API int zend_update_static_property_string(zend_class_entry *scope, char *name, int name_length, char *value TSRMLS_DC) { zval *tmp; - + ALLOC_ZVAL(tmp); tmp->is_ref = 0; tmp->refcount = 0; @@ -3337,7 +3337,7 @@ ZEND_API int zend_update_static_property_string(zend_class_entry *scope, char *n ZEND_API int zend_update_static_property_stringl(zend_class_entry *scope, char *name, int name_length, char *value, int value_len TSRMLS_DC) { zval *tmp; - + ALLOC_ZVAL(tmp); tmp->is_ref = 0; tmp->refcount = 0; @@ -3348,7 +3348,7 @@ ZEND_API int zend_update_static_property_stringl(zend_class_entry *scope, char * ZEND_API int zend_update_static_property_ascii_string(zend_class_entry *scope, char *name, int name_length, char *value TSRMLS_DC) { zval *tmp; - + ALLOC_ZVAL(tmp); tmp->is_ref = 0; tmp->refcount = 0; @@ -3359,7 +3359,7 @@ ZEND_API int zend_update_static_property_ascii_string(zend_class_entry *scope, c ZEND_API int zend_update_static_property_ascii_stringl(zend_class_entry *scope, char *name, int name_length, char *value, int value_len TSRMLS_DC) { zval *tmp; - + ALLOC_ZVAL(tmp); tmp->is_ref = 0; tmp->refcount = 0; @@ -3370,7 +3370,7 @@ ZEND_API int zend_update_static_property_ascii_stringl(zend_class_entry *scope, ZEND_API int zend_update_static_property_rt_string(zend_class_entry *scope, char *name, int name_length, char *value TSRMLS_DC) { zval *tmp; - + ALLOC_ZVAL(tmp); tmp->is_ref = 0; tmp->refcount = 0; @@ -3381,7 +3381,7 @@ ZEND_API int zend_update_static_property_rt_string(zend_class_entry *scope, char ZEND_API int zend_update_static_property_rt_stringl(zend_class_entry *scope, char *name, int name_length, char *value, int value_len TSRMLS_DC) { zval *tmp; - + ALLOC_ZVAL(tmp); tmp->is_ref = 0; tmp->refcount = 0; @@ -3392,7 +3392,7 @@ ZEND_API int zend_update_static_property_rt_stringl(zend_class_entry *scope, cha ZEND_API int zend_update_static_property_unicode(zend_class_entry *scope, char *name, int name_length, UChar *value TSRMLS_DC) { zval *tmp; - + ALLOC_ZVAL(tmp); tmp->is_ref = 0; tmp->refcount = 0; @@ -3403,7 +3403,7 @@ ZEND_API int zend_update_static_property_unicode(zend_class_entry *scope, char * ZEND_API int zend_update_static_property_unicodel(zend_class_entry *scope, char *name, int name_length, UChar *value, int value_len TSRMLS_DC) { zval *tmp; - + ALLOC_ZVAL(tmp); tmp->is_ref = 0; tmp->refcount = 0; @@ -3415,7 +3415,7 @@ ZEND_API zval *zend_read_property(zend_class_entry *scope, zval *object, char *n { zval *property, *value; zend_class_entry *old_scope = EG(scope); - + EG(scope) = scope; if (!Z_OBJ_HT_P(object)->read_property) { @@ -3439,7 +3439,7 @@ ZEND_API zval *zend_read_static_property(zend_class_entry *scope, char *name, in { zval **property; zend_class_entry *old_scope = EG(scope); - + EG(scope) = scope; property = zend_std_get_static_property(scope, IS_STRING, name, name_length, silent TSRMLS_CC); EG(scope) = old_scope; diff --git a/Zend/zend_API.h b/Zend/zend_API.h index 48a6c72f37..581a01d995 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | @@ -555,14 +555,14 @@ ZEND_API int add_property_unicodel_ex(zval *arg, char *key, uint key_len, UChar #define add_property_null(__arg, __key) add_property_null_ex(__arg, __key, strlen(__key) + 1 TSRMLS_CC) #define add_property_bool(__arg, __key, __b) add_property_bool_ex(__arg, __key, strlen(__key)+1, __b TSRMLS_CC) #define add_property_resource(__arg, __key, __r) add_property_resource_ex(__arg, __key, strlen(__key)+1, __r TSRMLS_CC) -#define add_property_double(__arg, __key, __d) add_property_double_ex(__arg, __key, strlen(__key)+1, __d TSRMLS_CC) +#define add_property_double(__arg, __key, __d) add_property_double_ex(__arg, __key, strlen(__key)+1, __d TSRMLS_CC) #define add_property_string(__arg, __key, __str, __duplicate) add_property_string_ex(__arg, __key, strlen(__key)+1, __str, __duplicate TSRMLS_CC) #define add_property_stringl(__arg, __key, __str, __length, __duplicate) add_property_stringl_ex(__arg, __key, strlen(__key)+1, __str, __length, __duplicate TSRMLS_CC) #define add_property_ascii_string(__arg, __key, __str, __duplicate) add_property_string_ex(__arg, __key, strlen(__key)+1, __str, __duplicate TSRMLS_CC) #define add_property_ascii_stringl(__arg, __key, __str, __length, __duplicate) add_property_stringl_ex(__arg, __key, strlen(__key)+1, __str, __length, __duplicate TSRMLS_CC) #define add_property_rt_string(__arg, __key, __str, __duplicate) add_property_ascii_string_ex(__arg, __key, strlen(__key)+1, __str, __duplicate TSRMLS_CC) #define add_property_rt_stringl(__arg, __key, __str, __length, __duplicate) add_property_rt_stringl_ex(__arg, __key, strlen(__key)+1, __str, __length, __duplicate TSRMLS_CC) -#define add_property_zval(__arg, __key, __value) add_property_zval_ex(__arg, __key, strlen(__key)+1, __value TSRMLS_CC) +#define add_property_zval(__arg, __key, __value) add_property_zval_ex(__arg, __key, strlen(__key)+1, __value TSRMLS_CC) #define add_property_unicode(__arg, __key, __str, __duplicate) add_property_unicode_ex(__arg, __key, strlen(__key)+1, __str, __duplicate TSRMLS_CC) #define add_property_unicodel(__arg, __key, __str, __length, __duplicate) add_property_unicodel_ex(__arg, __key, strlen(__key)+1, __str, __length, __duplicate TSRMLS_CC) @@ -942,7 +942,7 @@ END_EXTERN_C() #define ZEND_MINFO_FUNCTION ZEND_MODULE_INFO_D END_EXTERN_C() - + #endif /* ZEND_API_H */ diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c index 6edd6146ff..478f9df8c2 100644 --- a/Zend/zend_alloc.c +++ b/Zend/zend_alloc.c @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | @@ -306,7 +306,7 @@ ZEND_API void _efree(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) #if MEMORY_LIMIT AG(allocated_memory) -= SIZE; #endif - + ZEND_DO_FREE(p); HANDLE_UNBLOCK_INTERRUPTIONS(); } @@ -316,7 +316,7 @@ ZEND_API void *_ecalloc(size_t nmemb, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LI { void *p; int final_size = size*nmemb; - + HANDLE_BLOCK_INTERRUPTIONS(); p = _emalloc(final_size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); if (!p) { @@ -385,7 +385,7 @@ ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure ZEND_FILE_LIN p->lineno = __zend_lineno; p->magic = MEM_BLOCK_START_MAGIC; memcpy((((char *) p) + sizeof(zend_mem_header) + MEM_HEADER_PADDING + size), &mem_block_end_magic, sizeof(long)); -#endif +#endif p->size = size; @@ -510,7 +510,7 @@ ZEND_API int zend_set_memory_limit(unsigned int memory_limit) ZEND_API void start_memory_manager(TSRMLS_D) { AG(head) = NULL; - + #if MEMORY_LIMIT AG(memory_limit) = 1<<30; /* ridiculous limit, effectively no limit */ AG(allocated_memory) = 0; @@ -683,7 +683,7 @@ ZEND_API void shutdown_memory_manager(int silent, int full_shutdown TSRMLS_DC) } fprintf(stderr, "\n"); } - + } while (0); #endif @@ -821,7 +821,7 @@ ZEND_API int _mem_block_check(void *ptr, int silent ZEND_FILE_LINE_DC ZEND_FILE_ zend_debug_alloc_output("Unknown\n"); } } - + if (!silent) { zend_debug_alloc_output("---------------------------------------\n"); } @@ -836,7 +836,7 @@ ZEND_API void _full_mem_check(int silent ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_D TSRMLS_FETCH(); p = AG(head); - + zend_debug_alloc_output("------------------------------------------------\n"); zend_debug_alloc_output("Full Memory Check at %s:%d\n" ZEND_FILE_LINE_RELAY_CC); diff --git a/Zend/zend_alloc.h b/Zend/zend_alloc.h index c1731d73cf..50994c78c9 100644 --- a/Zend/zend_alloc.h +++ b/Zend/zend_alloc.h @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | diff --git a/Zend/zend_arg_defs.c b/Zend/zend_arg_defs.c index f1ce13a452..a8483ff3af 100644 --- a/Zend/zend_arg_defs.c +++ b/Zend/zend_arg_defs.c @@ -42,4 +42,3 @@ ZEND_END_ARG_INFO(); ZEND_BEGIN_ARG_INFO(all_args_by_ref, 1) ZEND_END_ARG_INFO(); - diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 3e4682b48d..9d4a267ee1 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | @@ -267,7 +267,7 @@ static int lookup_cv(zend_op_array *op_array, zend_uchar type, void *name, int n i = op_array->last_var; op_array->last_var++; if (op_array->last_var > op_array->size_var) { - op_array->size_var += 16; /* FIXME */ + op_array->size_var += 16; /* FIXME */ op_array->vars = erealloc(op_array->vars, op_array->size_var*sizeof(zend_compiled_variable)); } op_array->vars[i].name = name; /* estrndup(name, name_len); */ @@ -319,7 +319,7 @@ void zend_do_binary_assign_op(zend_uchar op, znode *result, znode *op1, znode *o if (last_op_number > 0) { zend_op *last_op = &CG(active_op_array)->opcodes[last_op_number-1]; - + switch (last_op->opcode) { case ZEND_FETCH_OBJ_RW: last_op->opcode = op; @@ -360,8 +360,8 @@ void fetch_simple_variable_ex(znode *result, znode *varname, int bp, zend_uchar zend_op *opline_ptr; zend_llist *fetch_list_ptr; - if (varname->op_type == IS_CONST && - (Z_TYPE(varname->u.constant) == IS_STRING || + if (varname->op_type == IS_CONST && + (Z_TYPE(varname->u.constant) == IS_STRING || Z_TYPE(varname->u.constant) == IS_UNICODE) && !zend_u_is_auto_global(Z_TYPE(varname->u.constant), Z_UNIVAL(varname->u.constant), Z_UNILEN(varname->u.constant) TSRMLS_CC) && !(Z_UNILEN(varname->u.constant) == (sizeof("this")-1) && @@ -390,7 +390,7 @@ void fetch_simple_variable_ex(znode *result, znode *varname, int bp, zend_uchar SET_UNUSED(opline_ptr->op2); opline_ptr->op2.u.EA.type = ZEND_FETCH_LOCAL; - if (varname->op_type == IS_CONST && + if (varname->op_type == IS_CONST && (Z_TYPE(varname->u.constant) == IS_STRING || Z_TYPE(varname->u.constant) == IS_UNICODE)) { if (zend_u_is_auto_global(Z_TYPE(varname->u.constant), Z_UNIVAL(varname->u.constant), Z_UNILEN(varname->u.constant) TSRMLS_CC)) { @@ -426,7 +426,7 @@ void zend_do_fetch_static_member(znode *result, znode *class_znode TSRMLS_DC) opline.result.u.EA.type = 0; opline.result.u.var = get_temporary_variable(CG(active_op_array)); opline.op1.op_type = IS_CONST; - ZVAL_TEXTL(&opline.op1.u.constant, + ZVAL_TEXTL(&opline.op1.u.constant, CG(active_op_array)->vars[result->u.var].name, CG(active_op_array)->vars[result->u.var].name_len, 1); SET_UNUSED(opline.op2); @@ -524,7 +524,7 @@ void zend_do_abstract_method(znode *function_name, znode *modifiers, znode *body char *method_type; if (CG(active_class_entry)->ce_flags & ZEND_ACC_INTERFACE) { - Z_LVAL(modifiers->u.constant) |= ZEND_ACC_ABSTRACT; + Z_LVAL(modifiers->u.constant) |= ZEND_ACC_ABSTRACT; method_type = "Interface"; } else { method_type = "Abstract"; @@ -555,7 +555,7 @@ static zend_bool opline_is_fetch_this(zend_op *opline TSRMLS_DC) { if ((opline->opcode == ZEND_FETCH_W) && (opline->op1.op_type == IS_CONST) && (Z_TYPE(opline->op1.u.constant) == IS_STRING || - Z_TYPE(opline->op1.u.constant) == IS_UNICODE) + Z_TYPE(opline->op1.u.constant) == IS_UNICODE) && (Z_UNILEN(opline->op1.u.constant) == (sizeof("this")-1)) && ZEND_U_EQUAL(Z_TYPE(opline->op1.u.constant), Z_UNIVAL(opline->op1.u.constant), Z_UNILEN(opline->op1.u.constant), "this", sizeof("this")-1)) { return 1; @@ -574,7 +574,7 @@ void zend_do_assign(znode *result, znode *variable, znode *value TSRMLS_DC) while (last_op_number - n > 0) { zend_op *last_op; - + last_op = &CG(active_op_array)->opcodes[last_op_number-n-1]; if (last_op->result.op_type == IS_VAR && @@ -648,7 +648,7 @@ void zend_do_assign_ref(znode *result, znode *lvar, znode *rvar TSRMLS_DC) opline->opcode = ZEND_ASSIGN_REF; if (zend_is_function_or_method_call(rvar)) { - opline->extended_value = ZEND_RETURNS_FUNCTION; + opline->extended_value = ZEND_RETURNS_FUNCTION; } else { opline->extended_value = 0; } @@ -710,7 +710,7 @@ void zend_do_while_end(znode *while_token, znode *close_bracket_token TSRMLS_DC) opline->op1.u.opline_num = while_token->u.opline_num; SET_UNUSED(opline->op1); SET_UNUSED(opline->op2); - + /* update while's conditional jmp */ CG(active_op_array)->opcodes[close_bracket_token->u.opline_num].op2.u.opline_num = get_next_op_number(CG(active_op_array)); @@ -849,7 +849,7 @@ void zend_do_if_after_statement(znode *closing_bracket_token, unsigned char init } zend_stack_top(&CG(bp_stack), (void **) &jmp_list_ptr); zend_llist_add_element(jmp_list_ptr, &if_end_op_number); - + CG(active_op_array)->opcodes[closing_bracket_token->u.opline_num].op2.u.opline_num = if_end_op_number+1; SET_UNUSED(opline->op1); SET_UNUSED(opline->op2); @@ -903,7 +903,7 @@ void zend_do_end_variable_parse(int type, int arg_offset TSRMLS_DC) le = fetch_list_ptr->head; /* TODO: $foo->x->y->z = 1 should fetch "x" and "y" for R or RW, not just W */ - + if (le) { opline_ptr = (zend_op *)le->data; if (opline_is_fetch_this(opline_ptr TSRMLS_CC)) { @@ -1069,7 +1069,7 @@ void zend_do_free(znode *op1 TSRMLS_DC) } } else if (op1->op_type == IS_CONST) { zval_dtor(&op1->u.constant); - } + } } @@ -1213,11 +1213,11 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n SET_UNUSED(opline->op1); SET_UNUSED(opline->op2); } - + { /* Push a seperator to the switch and foreach stacks */ zend_switch_entry switch_entry; - + switch_entry.cond.op_type = IS_UNUSED; switch_entry.default_case = 0; switch_entry.control_var = 0; @@ -1271,7 +1271,7 @@ void zend_do_end_function_declaration(znode *function_token TSRMLS_DC) } else { zend_uchar utype; - /* we don't care if the function name is longer, in fact lowercasing only + /* we don't care if the function name is longer, in fact lowercasing only * the beginning of the name speeds up the check process */ if (UG(unicode)) { utype = IS_UNICODE; @@ -1288,7 +1288,7 @@ void zend_do_end_function_declaration(znode *function_token TSRMLS_DC) ZEND_U_EQUAL(utype, lcname, lcname_len, ZEND_AUTOLOAD_FUNC_NAME, sizeof(ZEND_AUTOLOAD_FUNC_NAME)-1) && CG(active_op_array)->num_args != 1) { zend_error(E_COMPILE_ERROR, "%s() must take exactly 1 argument", ZEND_AUTOLOAD_FUNC_NAME); - } + } if (lcname != lcname_buf) { efree(lcname); } @@ -1387,7 +1387,7 @@ int zend_do_begin_function_call(znode *function_name TSRMLS_DC) zend_function *function; unsigned int lcname_len; char *lcname; - + lcname = zend_u_str_case_fold(Z_TYPE(function_name->u.constant), Z_UNIVAL(function_name->u.constant), Z_UNILEN(function_name->u.constant), 0, &lcname_len); if (zend_u_hash_find(CG(function_table), Z_TYPE(function_name->u.constant), lcname, lcname_len+1, (void **) &function)==FAILURE) { zend_do_begin_dynamic_function_call(function_name TSRMLS_CC); @@ -1401,22 +1401,22 @@ int zend_do_begin_function_call(znode *function_name TSRMLS_DC) } else { Z_STRVAL(function_name->u.constant) = lcname; } - + switch (function->type) { case ZEND_USER_FUNCTION: { zend_op_array *op_array = (zend_op_array *) function; - + zend_stack_push(&CG(function_call_stack), (void *) &op_array, sizeof(zend_function *)); } break; case ZEND_INTERNAL_FUNCTION: { zend_internal_function *internal_function = (zend_internal_function *) function; - + zend_stack_push(&CG(function_call_stack), (void *) &internal_function, sizeof(zend_function *)); } break; } - zend_do_extended_fcall_begin(TSRMLS_C); + zend_do_extended_fcall_begin(TSRMLS_C); return 0; } @@ -1430,7 +1430,7 @@ void zend_do_begin_method_call(znode *left_bracket TSRMLS_DC) zend_do_end_variable_parse(BP_VAR_R, 0 TSRMLS_CC); zend_do_begin_variable_parse(TSRMLS_C); - + last_op_number = get_next_op_number(CG(active_op_array))-1; last_op = &CG(active_op_array)->opcodes[last_op_number]; @@ -1451,9 +1451,9 @@ void zend_do_begin_method_call(znode *left_bracket TSRMLS_DC) } zend_stack_push(&CG(function_call_stack), (void *) &ptr, sizeof(zend_function *)); - zend_do_extended_fcall_begin(TSRMLS_C); + zend_do_extended_fcall_begin(TSRMLS_C); } - + void zend_do_clone(znode *result, znode *expr TSRMLS_DC) { @@ -1481,7 +1481,7 @@ void zend_do_begin_dynamic_function_call(znode *function_name TSRMLS_DC) SET_UNUSED(opline->op1); zend_stack_push(&CG(function_call_stack), (void *) &ptr, sizeof(zend_function *)); - zend_do_extended_fcall_begin(TSRMLS_C); + zend_do_extended_fcall_begin(TSRMLS_C); } @@ -1585,7 +1585,7 @@ void zend_do_begin_class_member_function_call(znode *class_name, znode *method_n void zend_do_end_function_call(znode *function_name, znode *result, znode *argument_list, int is_method, int is_dynamic_fcall TSRMLS_DC) { zend_op *opline; - + if (is_method && function_name && function_name->op_type == IS_UNUSED) { /* clone */ if (Z_LVAL(argument_list->u.constant) != 0) { @@ -1602,7 +1602,7 @@ void zend_do_end_function_call(znode *function_name, znode *result, znode *argum SET_UNUSED(opline->op1); } } - + opline->result.u.var = get_temporary_variable(CG(active_op_array)); opline->result.op_type = IS_VAR; *result = opline->result; @@ -1620,7 +1620,7 @@ void zend_do_pass_param(znode *param, zend_uchar op, int offset TSRMLS_DC) zend_function **function_ptr_ptr, *function_ptr; int send_by_reference; int send_function = 0; - + zend_stack_top(&CG(function_call_stack), (void **) &function_ptr_ptr); function_ptr = *function_ptr_ptr; @@ -1641,7 +1641,7 @@ void zend_do_pass_param(znode *param, zend_uchar op, int offset TSRMLS_DC) op = (param->op_type & (IS_VAR|IS_CV))?ZEND_SEND_REF:ZEND_SEND_VAL; send_by_reference = 0; } else { - send_by_reference = ARG_SHOULD_BE_SENT_BY_REF(function_ptr, (zend_uint) offset) ? ZEND_ARG_SEND_BY_REF : 0; + send_by_reference = ARG_SHOULD_BE_SENT_BY_REF(function_ptr, (zend_uint) offset) ? ZEND_ARG_SEND_BY_REF : 0; } } else { send_by_reference = 0; @@ -1711,11 +1711,11 @@ void zend_do_pass_param(znode *param, zend_uchar op, int offset TSRMLS_DC) static int generate_free_switch_expr(zend_switch_entry *switch_entry TSRMLS_DC) { zend_op *opline; - + if (switch_entry->cond.op_type != IS_VAR && switch_entry->cond.op_type != IS_TMP_VAR) { return (switch_entry->cond.op_type == IS_UNUSED); } - + opline = get_next_op(CG(active_op_array) TSRMLS_CC); opline->opcode = ZEND_SWITCH_FREE; @@ -1732,7 +1732,7 @@ static int generate_free_foreach_copy(zend_op *foreach_copy TSRMLS_DC) /* If we reach the seperator then stop applying the stack */ if (foreach_copy->result.op_type == IS_UNUSED && foreach_copy->op1.op_type == IS_UNUSED) { return 1; - } + } opline = get_next_op(CG(active_op_array) TSRMLS_CC); @@ -1749,14 +1749,14 @@ static int generate_free_foreach_copy(zend_op *foreach_copy TSRMLS_DC) SET_UNUSED(opline->op2); opline->extended_value = 0; } - + return 0; } void zend_do_return(znode *expr, int do_end_vparse TSRMLS_DC) { zend_op *opline; - + if (do_end_vparse) { if (CG(active_op_array)->return_reference && !zend_is_function_or_method_call(expr)) { zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); @@ -1776,7 +1776,7 @@ void zend_do_return(znode *expr, int do_end_vparse TSRMLS_DC) opline = get_next_op(CG(active_op_array) TSRMLS_CC); opline->opcode = ZEND_RETURN; - + if (expr) { opline->op1 = *expr; } else { @@ -1786,7 +1786,7 @@ void zend_do_return(znode *expr, int do_end_vparse TSRMLS_DC) if (do_end_vparse) { if (zend_is_function_or_method_call(expr)) { - opline->extended_value = ZEND_RETURNS_FUNCTION; + opline->extended_value = ZEND_RETURNS_FUNCTION; } else { opline->extended_value = 0; } @@ -1845,7 +1845,7 @@ void zend_do_begin_catch(znode *try_token, znode *catch_class, znode *catch_var, { long catch_op_number = get_next_op_number(CG(active_op_array)); zend_op *opline; - + if (catch_op_number > 0) { opline = &CG(active_op_array)->opcodes[catch_op_number-1]; if (opline->opcode == ZEND_FETCH_CLASS) { @@ -1871,7 +1871,7 @@ void zend_do_end_catch(znode *try_token TSRMLS_DC) void zend_do_throw(znode *expr TSRMLS_DC) { zend_op *opline; - + opline = get_next_op(CG(active_op_array) TSRMLS_CC); opline->opcode = ZEND_THROW; opline->op1 = *expr; @@ -1952,7 +1952,7 @@ static void do_inherit_parent_constructor(zend_class_entry *ce TSRMLS_DC) } return; } - + if (zend_hash_find(&ce->parent->function_table, ZEND_CONSTRUCTOR_FUNC_NAME, sizeof(ZEND_CONSTRUCTOR_FUNC_NAME), (void **)&function)==SUCCESS) { /* inherit parent's constructor */ zend_hash_update(&ce->function_table, ZEND_CONSTRUCTOR_FUNC_NAME, sizeof(ZEND_CONSTRUCTOR_FUNC_NAME), function, sizeof(zend_function), NULL); @@ -2083,7 +2083,7 @@ static zend_bool do_inherit_method_check(HashTable *child_function_table, zend_f if (parent->common.fn_flags & ZEND_ACC_ABSTRACT && parent->common.scope != (child->common.prototype ? child->common.prototype->common.scope : child->common.scope) && child->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_IMPLEMENTED_ABSTRACT)) { - zend_error(E_COMPILE_ERROR, "Can't inherit abstract function %v::%v() (previously declared abstract in %v)", + zend_error(E_COMPILE_ERROR, "Can't inherit abstract function %v::%v() (previously declared abstract in %v)", parent->common.scope->name, child->common.function_name, child->common.prototype ? child->common.prototype->common.scope->name : child->common.scope->name); @@ -2116,7 +2116,7 @@ static zend_bool do_inherit_method_check(HashTable *child_function_table, zend_f */ if ((child_flags & ZEND_ACC_PPP_MASK) > (parent_flags & ZEND_ACC_PPP_MASK)) { zend_error(E_COMPILE_ERROR, "Access level to %v::%v() must be %s (as in class %v)%s", ZEND_FN_SCOPE_NAME(child), child->common.function_name, zend_visibility_string(parent_flags), ZEND_FN_SCOPE_NAME(parent), (parent_flags&ZEND_ACC_PUBLIC) ? "" : " or weaker"); - } else if (((child_flags & ZEND_ACC_PPP_MASK) < (parent_flags & ZEND_ACC_PPP_MASK)) + } else if (((child_flags & ZEND_ACC_PPP_MASK) < (parent_flags & ZEND_ACC_PPP_MASK)) && ((parent_flags & ZEND_ACC_PPP_MASK) & ZEND_ACC_PRIVATE)) { child->common.fn_flags |= ZEND_ACC_CHANGED; } @@ -2129,7 +2129,7 @@ static zend_bool do_inherit_method_check(HashTable *child_function_table, zend_f child->common.prototype = parent->common.prototype; } - + if (child->common.prototype) { if (!zend_do_perform_implementation_check(child, child->common.prototype)) { zend_error(E_COMPILE_ERROR, "Declaration of %v::%v() must be compatible with that of %v::%v()", ZEND_FN_SCOPE_NAME(child), child->common.function_name, ZEND_FN_SCOPE_NAME(child->common.prototype), child->common.prototype->common.function_name); @@ -2150,7 +2150,7 @@ static zend_bool do_inherit_property_access_check(HashTable *target_ht, zend_pro zend_class_entry *parent_ce = ce->parent; zend_uchar utype; TSRMLS_FETCH(); - + utype = UG(unicode)?IS_UNICODE:IS_STRING; if (parent_info->flags & (ZEND_ACC_PRIVATE|ZEND_ACC_SHADOW)) { if (zend_u_hash_quick_find(&ce->properties_info, hash_key->type, hash_key->u.string, hash_key->nKeyLength, hash_key->h, (void **) &child_info)==SUCCESS) { @@ -2172,20 +2172,20 @@ static zend_bool do_inherit_property_access_check(HashTable *target_ht, zend_pro if ((parent_info->flags & ZEND_ACC_STATIC) != (child_info->flags & ZEND_ACC_STATIC)) { zend_error(E_COMPILE_ERROR, "Cannot redeclare %s%v::$%R as %s%v::$%R", (parent_info->flags & ZEND_ACC_STATIC) ? "static " : "non static ", parent_ce->name, hash_key->type, hash_key->u.string, - (child_info->flags & ZEND_ACC_STATIC) ? "static " : "non static ", ce->name, hash_key->type, hash_key->u.string); + (child_info->flags & ZEND_ACC_STATIC) ? "static " : "non static ", ce->name, hash_key->type, hash_key->u.string); } - + if(parent_info->flags & ZEND_ACC_CHANGED) { child_info->flags |= ZEND_ACC_CHANGED; } - + if ((child_info->flags & ZEND_ACC_PPP_MASK) > (parent_info->flags & ZEND_ACC_PPP_MASK)) { zend_error(E_COMPILE_ERROR, "Access level to %v::$%R must be %s (as in class %v)%s", ce->name, hash_key->type, hash_key->u.string, zend_visibility_string(parent_info->flags), parent_ce->name, (parent_info->flags&ZEND_ACC_PUBLIC) ? "" : " or weaker"); } else if (child_info->flags & ZEND_ACC_IMPLICIT_PUBLIC) { if (!(parent_info->flags & ZEND_ACC_IMPLICIT_PUBLIC)) { /* Explicitly copy the default value from the parent (if it has one) */ zval **pvalue; - + if (zend_u_hash_quick_find(&parent_ce->default_properties, utype, parent_info->name, parent_info->name_length+1, parent_info->h, (void **) &pvalue) == SUCCESS) { (*pvalue)->refcount++; zend_u_hash_del(&ce->default_properties, utype, child_info->name, child_info->name_length+1); @@ -2214,8 +2214,8 @@ static zend_bool do_inherit_property_access_check(HashTable *target_ht, zend_pro if (Z_TYPE_PP(new_prop) != IS_NULL && Z_TYPE_PP(prop) != IS_NULL) { char *prop_name, *tmp; - zend_u_unmangle_property_name(utype, child_info->name, &tmp, &prop_name); - zend_error(E_COMPILE_ERROR, "Cannot change initial value of property static protected %v::$%v in class %v", + zend_u_unmangle_property_name(utype, child_info->name, &tmp, &prop_name); + zend_error(E_COMPILE_ERROR, "Cannot change initial value of property static protected %v::$%v in class %v", parent_ce->name, prop_name, ce->name); } } @@ -2336,7 +2336,7 @@ static zend_bool do_inherit_constant_check(HashTable *child_constants_table, zva if (*old_constant != *parent_constant) { zend_error(E_COMPILE_ERROR, "Cannot inherit previously-inherited constant %R from interface %v", hash_key->type, hash_key->u.string, iface->name); } - return 0; + return 0; } return 1; } @@ -2386,7 +2386,7 @@ ZEND_API int do_bind_function(zend_op *opline, HashTable *function_table, zend_b return SUCCESS; } } - + ZEND_API zend_class_entry *do_bind_class(zend_op *opline, HashTable *class_table, zend_bool compile_time TSRMLS_DC) { @@ -2565,7 +2565,7 @@ void zend_do_boolean_or_begin(znode *expr1, znode *op_token TSRMLS_DC) } opline->op1 = *expr1; SET_UNUSED(opline->op2); - + op_token->u.opline_num = next_op_number; *expr1 = opline->result; @@ -2600,7 +2600,7 @@ void zend_do_boolean_and_begin(znode *expr1, znode *op_token TSRMLS_DC) } opline->op1 = *expr1; SET_UNUSED(opline->op2); - + op_token->u.opline_num = next_op_number; *expr1 = opline->result; @@ -2686,7 +2686,7 @@ void zend_do_switch_end(znode *case_list TSRMLS_DC) { zend_op *opline; zend_switch_entry *switch_entry_ptr; - + zend_stack_top(&CG(switch_cond_stack), (void **) &switch_entry_ptr); /* add code to jmp to default case */ @@ -2746,7 +2746,7 @@ void zend_do_case_before_statement(znode *case_list, znode *case_token, znode *c zval_copy_ctor(&opline->op1.u.constant); } result = opline->result; - + next_op_number = get_next_op_number(CG(active_op_array)); opline = get_next_op(CG(active_op_array) TSRMLS_CC); opline->opcode = ZEND_JMPZ; @@ -2854,11 +2854,11 @@ void zend_do_begin_class_declaration(znode *class_token, znode *class_name, znod opline = get_next_op(CG(active_op_array) TSRMLS_CC); opline->op1.op_type = IS_CONST; build_runtime_defined_function_key(&opline->op1.u.constant, Z_TYPE(class_name->u.constant), lcname, lcname_len TSRMLS_CC); - + opline->op2.op_type = IS_CONST; Z_TYPE(opline->op2.u.constant) = Z_TYPE(class_name->u.constant); opline->op2.u.constant.refcount = 1; - + if (doing_inheritance) { opline->extended_value = parent_class_name->u.var; opline->opcode = ZEND_DECLARE_INHERITED_CLASS; @@ -2873,7 +2873,7 @@ void zend_do_begin_class_declaration(znode *class_token, znode *class_name, znod Z_STRVAL(opline->op2.u.constant) = lcname; Z_STRLEN(opline->op2.u.constant) = lcname_len; } - + zend_u_hash_update(CG(class_table), Z_TYPE(opline->op1.u.constant), Z_UNIVAL(opline->op1.u.constant), Z_UNILEN(opline->op1.u.constant), &new_class_entry, sizeof(zend_class_entry *), NULL); CG(active_class_entry) = new_class_entry; @@ -2963,7 +2963,7 @@ void zend_do_implements_interface(znode *interface_znode TSRMLS_DC) } break; } - + opline = get_next_op(CG(active_op_array) TSRMLS_CC); opline->opcode = ZEND_ADD_INTERFACE; opline->op1 = CG(implementing_class); @@ -2976,7 +2976,7 @@ ZEND_API void zend_mangle_property_name(char **dest, int *dest_length, char *src { char *prop_name; int prop_name_length; - + prop_name_length = 1 + src1_length + 1 + src2_length; prop_name = pemalloc(prop_name_length + 1, internal); prop_name[0] = '\0'; @@ -3093,11 +3093,11 @@ void zend_do_declare_property(znode *var_name, znode *value, zend_uint access_ty void zend_do_declare_class_constant(znode *var_name, znode *value TSRMLS_DC) { zval *property; - + if(Z_TYPE(value->u.constant) == IS_CONSTANT_ARRAY) { zend_error(E_COMPILE_ERROR, "Arrays are not allowed in class constants"); } - + ALLOC_ZVAL(property); if (value) { @@ -3121,9 +3121,9 @@ void zend_do_fetch_property(znode *result, znode *object, znode *property TSRMLS zend_op opline; zend_llist *fetch_list_ptr; zend_op *opline_ptr=NULL; - + zend_stack_top(&CG(bp_stack), (void **) &fetch_list_ptr); - + if (fetch_list_ptr->count == 1) { zend_llist_element *le; @@ -3234,7 +3234,7 @@ void zend_do_begin_new_object(znode *new_token, znode *class_type TSRMLS_DC) { zend_op *opline; unsigned char *ptr = NULL; - + new_token->u.opline_num = get_next_op_number(CG(active_op_array)); opline = get_next_op(CG(active_op_array) TSRMLS_CC); opline->opcode = ZEND_NEW; @@ -3242,7 +3242,7 @@ void zend_do_begin_new_object(znode *new_token, znode *class_type TSRMLS_DC) opline->result.u.var = get_temporary_variable(CG(active_op_array)); opline->op1 = *class_type; SET_UNUSED(opline->op2); - + zend_stack_push(&CG(function_call_stack), (void *) &ptr, sizeof(unsigned char *)); } @@ -3273,7 +3273,7 @@ void zend_do_fetch_constant(znode *result, znode *constant_container, znode *con case ZEND_RT: { zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); - + opline->opcode = ZEND_FETCH_CONSTANT; opline->result.op_type = IS_TMP_VAR; opline->result.u.var = get_temporary_variable(CG(active_op_array)); @@ -3389,7 +3389,7 @@ void zend_do_add_static_array_element(znode *result, znode *offset, znode *expr) zend_symtable_update(Z_ARRVAL(result->u.constant), "", 1, &element, sizeof(zval *), NULL); break; case IS_LONG: - case IS_BOOL: + case IS_BOOL: zend_hash_index_update(Z_ARRVAL(result->u.constant), Z_LVAL(offset->u.constant), &element, sizeof(zval *), NULL); break; case IS_DOUBLE: @@ -3656,7 +3656,7 @@ void zend_do_unset(znode *variable TSRMLS_DC) break; } - } + } } @@ -3667,7 +3667,7 @@ void zend_do_isset_or_isempty(int type, znode *result, znode *variable TSRMLS_DC zend_do_end_variable_parse(BP_VAR_IS, 0 TSRMLS_CC); zend_check_writable_variable(variable); - + if (variable->op_type == IS_CV) { last_op = get_next_op(CG(active_op_array) TSRMLS_CC); last_op->opcode = ZEND_ISSET_ISEMPTY_VAR; @@ -3680,7 +3680,7 @@ void zend_do_isset_or_isempty(int type, znode *result, znode *variable TSRMLS_DC last_op->result.u.var = get_temporary_variable(CG(active_op_array)); } else { last_op = &CG(active_op_array)->opcodes[get_next_op_number(CG(active_op_array))-1]; - + switch (last_op->opcode) { case ZEND_FETCH_IS: last_op->opcode = ZEND_ISSET_ISEMPTY_VAR; @@ -3711,7 +3711,7 @@ void zend_do_instanceof(znode *result, znode *expr, znode *class_znode, int type opline->extended_value |= ZEND_FETCH_CLASS_NO_AUTOLOAD; } } - + opline = get_next_op(CG(active_op_array) TSRMLS_CC); opline->opcode = ZEND_INSTANCEOF; opline->result.op_type = IS_TMP_VAR; @@ -3783,7 +3783,7 @@ void zend_do_foreach_begin(znode *foreach_token, znode *open_brackets_token, zno void zend_do_foreach_fetch(znode *foreach_token, znode *open_brackets_token, znode *as_token TSRMLS_DC) { zend_op *opline; - + /* save the location of FE_FETCH */ as_token->u.opline_num = get_next_op_number(CG(active_op_array)); @@ -3837,7 +3837,7 @@ void zend_do_foreach_cont(znode *foreach_token, znode *as_token, znode *value, z } value_node = opline->result; - + zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); if (assign_by_ref) { /* Mark FE_FETCH as IS_VAR as it holds the data directly as a value */ @@ -3958,14 +3958,14 @@ void zend_do_end_heredoc(TSRMLS_D) if (Z_USTRVAL(opline->op2.u.constant)[Z_USTRLEN(opline->op2.u.constant)-1]=='\r') { Z_USTRVAL(opline->op2.u.constant)[(Z_USTRLEN(opline->op2.u.constant)--)-1] = 0; } - } + } } else { Z_STRVAL(opline->op2.u.constant)[(Z_STRLEN(opline->op2.u.constant)--)-1] = 0; if (Z_STRLEN(opline->op2.u.constant)>0) { if (Z_STRVAL(opline->op2.u.constant)[Z_STRLEN(opline->op2.u.constant)-1]=='\r') { Z_STRVAL(opline->op2.u.constant)[(Z_STRLEN(opline->op2.u.constant)--)-1] = 0; } - } + } } } @@ -4010,7 +4010,7 @@ void zend_do_begin_qm_op(znode *cond, znode *qm_token TSRMLS_DC) { int jmpz_op_number = get_next_op_number(CG(active_op_array)); zend_op *opline; - + opline = get_next_op(CG(active_op_array) TSRMLS_CC); opline->opcode = ZEND_JMPZ; @@ -4053,7 +4053,7 @@ void zend_do_qm_false(znode *result, znode *false_value, znode *qm_token, znode opline->result = *qm_token; opline->op1 = *false_value; SET_UNUSED(opline->op2); - + CG(active_op_array)->opcodes[colon_token->u.opline_num].op1.u.opline_num = get_next_op_number(CG(active_op_array)); *result = opline->result; @@ -4065,11 +4065,11 @@ void zend_do_qm_false(znode *result, znode *false_value, znode *qm_token, znode void zend_do_extended_info(TSRMLS_D) { zend_op *opline; - + if (!CG(extended_info)) { return; } - + opline = get_next_op(CG(active_op_array) TSRMLS_CC); opline->opcode = ZEND_EXT_STMT; @@ -4081,11 +4081,11 @@ void zend_do_extended_info(TSRMLS_D) void zend_do_extended_fcall_begin(TSRMLS_D) { zend_op *opline; - + if (!CG(extended_info)) { return; } - + opline = get_next_op(CG(active_op_array) TSRMLS_CC); opline->opcode = ZEND_EXT_FCALL_BEGIN; @@ -4097,11 +4097,11 @@ void zend_do_extended_fcall_begin(TSRMLS_D) void zend_do_extended_fcall_end(TSRMLS_D) { zend_op *opline; - + if (!CG(extended_info)) { return; } - + opline = get_next_op(CG(active_op_array) TSRMLS_CC); opline->opcode = ZEND_EXT_FCALL_END; @@ -4192,7 +4192,7 @@ again: efree(Z_STRVAL(zendlval->u.constant)); break; } - + INIT_PZVAL(&zendlval->u.constant); zendlval->op_type = IS_CONST; return retval; @@ -4266,7 +4266,7 @@ int zend_get_class_fetch_type(zend_uchar type, char *class_name, uint class_name { if ((class_name_len == sizeof("self")-1) && ZEND_U_EQUAL(type, class_name, class_name_len, "self", sizeof("self")-1)) { - return ZEND_FETCH_CLASS_SELF; + return ZEND_FETCH_CLASS_SELF; } else if ((class_name_len == sizeof("parent")-1) && ZEND_U_EQUAL(type, class_name, class_name_len, "parent", sizeof("parent")-1)) { return ZEND_FETCH_CLASS_PARENT; @@ -4286,11 +4286,11 @@ ZEND_API char* zend_get_compiled_variable_name(zend_op_array *op_array, zend_uin void zend_do_normalization(znode *result, znode *str TSRMLS_DC) { zend_op *opline; - + if (!UG(unicode)) { *result = *str; return; - } + } opline = get_next_op(CG(active_op_array) TSRMLS_CC); opline->opcode = ZEND_U_NORMALIZE; opline->result.op_type = IS_TMP_VAR; diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index d1d4a2f744..d9a9d2f6c7 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | @@ -173,7 +173,7 @@ typedef struct _zend_compiled_variable { struct _zend_op_array { /* Common elements */ zend_uchar type; - char *function_name; + char *function_name; zend_class_entry *scope; zend_uint fn_flags; union _zend_function *prototype; @@ -227,9 +227,9 @@ struct _zend_op_array { typedef struct _zend_internal_function { /* Common elements */ zend_uchar type; - char *function_name; + char *function_name; zend_class_entry *scope; - zend_uint fn_flags; + zend_uint fn_flags; union _zend_function *prototype; zend_uint num_args; zend_uint required_num_args; @@ -259,7 +259,7 @@ typedef union _zend_function { zend_bool pass_rest_by_reference; unsigned char return_reference; } common; - + zend_op_array op_array; zend_internal_function internal_function; } zend_function; @@ -518,7 +518,7 @@ void zend_do_normalization(znode *result, znode *str TSRMLS_DC); /* helper functions in zend_language_scanner.l */ ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type TSRMLS_DC); -ZEND_API zend_op_array *compile_string(zval *source_string, char *filename TSRMLS_DC); +ZEND_API zend_op_array *compile_string(zval *source_string, char *filename TSRMLS_DC); ZEND_API zend_op_array *compile_filename(int type, zval *filename TSRMLS_DC); ZEND_API int zend_execute_scripts(int type TSRMLS_DC, zval **retval, int file_count, ...); ZEND_API int open_file_for_scanning(zend_file_handle *file_handle TSRMLS_DC); diff --git a/Zend/zend_config.nw.h b/Zend/zend_config.nw.h index 498608bb31..f3bece2216 100644 --- a/Zend/zend_config.nw.h +++ b/Zend/zend_config.nw.h @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | @@ -64,7 +64,7 @@ typedef unsigned int uint; /* This will cause the compilation process to be MUCH longer, but will generate * a much quicker PHP binary */ -/* +/* #undef inline #ifdef ZEND_WIN32_FORCE_INLINE # define inline __forceinline diff --git a/Zend/zend_config.w32.h b/Zend/zend_config.w32.h index 236e99652f..d3f1ef158d 100644 --- a/Zend/zend_config.w32.h +++ b/Zend/zend_config.w32.h @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | @@ -87,7 +87,7 @@ typedef unsigned int uint; #define ZEND_DLEXPORT __declspec(dllexport) #define ZEND_DLIMPORT __declspec(dllimport) -/* 0x00200000L is MB_SERVICE_NOTIFICATION, which is only supported under Windows NT +/* 0x00200000L is MB_SERVICE_NOTIFICATION, which is only supported under Windows NT * (and requires _WIN32_WINNT to be defined, which prevents the resulting executable * from running under Windows 9x * Windows 9x should silently ignore it, so it's being used here directly diff --git a/Zend/zend_constants.c b/Zend/zend_constants.c index 7c4bfec095..f4aaaae5d8 100644 --- a/Zend/zend_constants.c +++ b/Zend/zend_constants.c @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | @@ -117,7 +117,7 @@ void zend_register_standard_constants(TSRMLS_D) /* true/false constants */ { zend_constant c; - + Z_TYPE(c.value) = IS_BOOL; c.flags = CONST_PERSISTENT; c.module_number = 0; @@ -127,7 +127,7 @@ void zend_register_standard_constants(TSRMLS_D) Z_LVAL(c.value) = 1; Z_TYPE(c.value) = IS_BOOL; zend_register_constant(&c TSRMLS_CC); - + c.name = zend_strndup(ZEND_STRL("FALSE")); c.name_len = sizeof("FALSE"); Z_LVAL(c.value) = 0; @@ -169,7 +169,7 @@ void clean_non_persistent_constants(TSRMLS_D) ZEND_API void zend_register_long_constant(char *name, uint name_len, long lval, int flags, int module_number TSRMLS_DC) { zend_constant c; - + Z_TYPE(c.value) = IS_LONG; Z_LVAL(c.value) = lval; c.flags = flags; @@ -183,7 +183,7 @@ ZEND_API void zend_register_long_constant(char *name, uint name_len, long lval, ZEND_API void zend_register_double_constant(char *name, uint name_len, double dval, int flags, int module_number TSRMLS_DC) { zend_constant c; - + Z_TYPE(c.value) = IS_DOUBLE; Z_DVAL(c.value) = dval; c.flags = flags; @@ -197,7 +197,7 @@ ZEND_API void zend_register_double_constant(char *name, uint name_len, double dv ZEND_API void zend_register_stringl_constant(char *name, uint name_len, char *strval, uint strlen, int flags, int module_number TSRMLS_DC) { zend_constant c; - + Z_TYPE(c.value) = IS_STRING; Z_STRVAL(c.value) = strval; Z_STRLEN(c.value) = strlen; @@ -237,7 +237,7 @@ ZEND_API int zend_u_get_constant(zend_uchar type, void *name, uint name_len, zva } else { scope = CG(active_class_entry); } - + if (UG(unicode)) { class_name = (char*)eustrndup((UChar*)name, class_name_len); } else { @@ -252,12 +252,12 @@ ZEND_API int zend_u_get_constant(zend_uchar type, void *name, uint name_len, zva zend_error(E_ERROR, "Cannot access self:: when no class scope is active"); retval = 0; } - } else if (class_name_len == sizeof("parent")-1 && + } else if (class_name_len == sizeof("parent")-1 && ZEND_U_EQUAL(type, class_name, class_name_len, "parent", sizeof("parent")-1)) { - if (!scope) { + if (!scope) { zend_error(E_ERROR, "Cannot access parent:: when no class scope is active"); - } else if (!scope->parent) { - zend_error(E_ERROR, "Cannot access parent:: when current class scope has no parent"); + } else if (!scope->parent) { + zend_error(E_ERROR, "Cannot access parent:: when current class scope has no parent"); } else { ce = &scope->parent; } @@ -281,15 +281,15 @@ ZEND_API int zend_u_get_constant(zend_uchar type, void *name, uint name_len, zva *result = **ret_constant; zval_copy_ctor(result); } - + return retval; } - + if (zend_u_hash_find(EG(zend_constants), type, name, name_len+1, (void **) &c) == FAILURE) { unsigned int lookup_name_len; lookup_name = zend_u_str_case_fold(type, name, name_len, 1, &lookup_name_len); - + if (zend_u_hash_find(EG(zend_constants), type, lookup_name, lookup_name_len+1, (void **) &c)==SUCCESS) { if ((c->flags & CONST_CS) && memcmp(c->name, name, UG(unicode)?UBYTES(name_len):name_len)!=0) { retval=0; diff --git a/Zend/zend_constants.h b/Zend/zend_constants.h index 53acc92805..9c9e8168b0 100644 --- a/Zend/zend_constants.h +++ b/Zend/zend_constants.h @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | diff --git a/Zend/zend_dynamic_array.c b/Zend/zend_dynamic_array.c index 20dddc4800..bb931ef43a 100644 --- a/Zend/zend_dynamic_array.c +++ b/Zend/zend_dynamic_array.c @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | diff --git a/Zend/zend_dynamic_array.h b/Zend/zend_dynamic_array.h index 39573d9058..88fe940850 100644 --- a/Zend/zend_dynamic_array.h +++ b/Zend/zend_dynamic_array.h @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | diff --git a/Zend/zend_errors.h b/Zend/zend_errors.h index 63f9290372..7b556b19a9 100644 --- a/Zend/zend_errors.h +++ b/Zend/zend_errors.h @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 6945af9fe8..59cad0b0f7 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -144,7 +144,7 @@ ZEND_METHOD(exception, __construct) UErrorCode status = U_ZERO_ERROR; UChar *u_str; int32_t u_len; - + zend_convert_to_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &u_str, &u_len, message, message_len, &status); zend_update_property_unicodel(default_exception_ce, object, "message", sizeof("message")-1, u_str, u_len TSRMLS_CC); efree(u_str); @@ -183,7 +183,7 @@ ZEND_METHOD(error_exception, __construct) UErrorCode status = U_ZERO_ERROR; UChar *u_str; int32_t u_len; - + zend_convert_to_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &u_str, &u_len, message, message_len, &status); zend_update_property_unicodel(default_exception_ce, object, "message", sizeof("message")-1, u_str, u_len TSRMLS_CC); efree(u_str); @@ -197,11 +197,11 @@ ZEND_METHOD(error_exception, __construct) } zend_update_property_long(default_exception_ce, object, "severity", sizeof("severity")-1, severity TSRMLS_CC); - + if (argc >= 4) { if (file_type == IS_UNICODE) { zend_update_property_unicodel(default_exception_ce, object, "file", sizeof("file")-1, filename, filename_len TSRMLS_CC); - } else { + } else { zend_update_property_stringl(default_exception_ce, object, "file", sizeof("file")-1, filename, filename_len TSRMLS_CC); } if (argc < 5) { @@ -460,7 +460,7 @@ static int _build_trace_args(zval **arg, int num_args, va_list args, zend_hash_k if(!dup) { efree(class_name); } - + TRACE_APPEND_STR("), "); break; } @@ -523,7 +523,7 @@ ZEND_METHOD(exception, getTraceAsString) zval *trace; char *res = estrdup(""), **str = &res, *s_tmp; int res_len = 0, *len = &res_len, num = 0; - + trace = zend_read_property(default_exception_ce, getThis(), "trace", sizeof("trace")-1, 1 TSRMLS_CC); zend_hash_apply_with_arguments(Z_ARRVAL_P(trace), (apply_func_args_t)_build_trace_string, 3, str, len, &num); @@ -532,8 +532,8 @@ ZEND_METHOD(exception, getTraceAsString) TRACE_APPEND_STRL(s_tmp, strlen(s_tmp)); efree(s_tmp); - res[res_len] = '\0'; - RETURN_STRINGL(res, res_len, 0); + res[res_len] = '\0'; + RETURN_STRINGL(res, res_len, 0); } /* }}} */ @@ -542,7 +542,7 @@ int zend_spprintf(char **message, int max_len, char *format, ...) va_list arg; int len; - va_start(arg, format); + va_start(arg, format); len = zend_vspprintf(message, max_len, format, arg); va_end(arg); return len; @@ -585,12 +585,12 @@ ZEND_METHOD(exception, __toString) } if (Z_UNILEN(message) > 0) { - len = zend_spprintf(&str, 0, "exception '%v' with message '%R' in %R:%ld\nStack trace:\n%s", - Z_OBJCE_P(getThis())->name, Z_TYPE(message), Z_UNIVAL(message), Z_TYPE(file), Z_UNIVAL(file), Z_LVAL(line), + len = zend_spprintf(&str, 0, "exception '%v' with message '%R' in %R:%ld\nStack trace:\n%s", + Z_OBJCE_P(getThis())->name, Z_TYPE(message), Z_UNIVAL(message), Z_TYPE(file), Z_UNIVAL(file), Z_LVAL(line), (trace && Z_STRLEN_P(trace)) ? Z_STRVAL_P(trace) : "#0 {main}\n"); } else { - len = zend_spprintf(&str, 0, "exception '%v' in %R:%ld\nStack trace:\n%s", - Z_OBJCE_P(getThis())->name, Z_TYPE(file), Z_UNIVAL(file), Z_LVAL(line), + len = zend_spprintf(&str, 0, "exception '%v' in %R:%ld\nStack trace:\n%s", + Z_OBJCE_P(getThis())->name, Z_TYPE(file), Z_UNIVAL(file), Z_LVAL(line), (trace && Z_STRLEN_P(trace)) ? Z_STRVAL_P(trace) : "#0 {main}\n"); } @@ -612,9 +612,9 @@ ZEND_METHOD(exception, __toString) /* All functions that may be used in uncaught exception handlers must be final * and must not throw exceptions. Otherwise we would need a facility to handle - * such exceptions in that handler. + * such exceptions in that handler. * Also all getXY() methods are final because thy serve as read only access to - * their corresponding properties, no more, no less. If after all you need to + * their corresponding properties, no more, no less. If after all you need to * override somthing then it is method __toString(). * And never try to change the state of exceptions and never implement anything * that gives the user anything to accomplish this. @@ -659,7 +659,7 @@ void zend_register_default_exception(TSRMLS_D) INIT_CLASS_ENTRY(ce, "Exception", default_exception_functions); default_exception_ce = zend_register_internal_class(&ce TSRMLS_CC); - default_exception_ce->create_object = zend_default_exception_new; + default_exception_ce->create_object = zend_default_exception_new; memcpy(&default_exception_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); default_exception_handlers.clone_obj = NULL; @@ -672,7 +672,7 @@ void zend_register_default_exception(TSRMLS_D) INIT_CLASS_ENTRY(ce, "ErrorException", error_exception_functions); error_exception_ce = zend_register_internal_class_ex(&ce, default_exception_ce, NULL TSRMLS_CC); - error_exception_ce->create_object = zend_error_exception_new; + error_exception_ce->create_object = zend_error_exception_new; zend_declare_property_long(error_exception_ce, "severity", sizeof("severity")-1, E_ERROR, ZEND_ACC_PROTECTED TSRMLS_CC); } @@ -701,7 +701,7 @@ ZEND_API zval * zend_throw_exception(zend_class_entry *exception_ce, char *messa exception_ce = default_exception_ce; } object_init_ex(ex, exception_ce); - + if (message) { zend_update_property_rt_string(default_exception_ce, ex, "message", sizeof("message")-1, message TSRMLS_CC); @@ -721,7 +721,7 @@ ZEND_API zval * zend_throw_exception_ex(zend_class_entry *exception_ce, long cod char *message; zval *zexception; - va_start(arg, format); + va_start(arg, format); zend_vspprintf(&message, 0, format, arg); va_end(arg); zexception = zend_throw_exception(exception_ce, message, code TSRMLS_CC); @@ -740,7 +740,7 @@ ZEND_API zval * zend_throw_error_exception(zend_class_entry *exception_ce, char static void zend_error_va(int type, const char *file, uint lineno, const char *format, ...) { va_list args; - + va_start(args, format); zend_error_cb(type, file, lineno, format, args); va_end(args); @@ -754,7 +754,7 @@ ZEND_API void zend_exception_error(zval *exception TSRMLS_DC) zval *str, *file, *line; EG(exception) = NULL; - + zend_call_method_with_0_params(&exception, ce_exception, NULL, "__tostring", &str); if (!EG(exception)) { if (Z_TYPE_P(str) != IS_STRING) { @@ -764,7 +764,7 @@ ZEND_API void zend_exception_error(zval *exception TSRMLS_DC) } } zval_ptr_dtor(&str); - + if (EG(exception)) { /* do the best we can to inform about the inner exception */ if (instanceof_function(ce_exception, default_exception_ce TSRMLS_CC)) { diff --git a/Zend/zend_exceptions.h b/Zend/zend_exceptions.h index c90def264a..b82d45b44b 100644 --- a/Zend/zend_exceptions.h +++ b/Zend/zend_exceptions.h @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | @@ -34,7 +34,7 @@ ZEND_API zend_class_entry *zend_exception_get_default(TSRMLS_D); ZEND_API zend_class_entry *zend_get_error_exception(TSRMLS_D); ZEND_API void zend_register_default_classes(TSRMLS_D); -/* exception_ce NULL or zend_exception_get_default() or a derived class +/* exception_ce NULL or zend_exception_get_default() or a derived class * message NULL or the message of the exception */ ZEND_API zval * zend_throw_exception(zend_class_entry *exception_ce, char *message, long code TSRMLS_DC); ZEND_API zval * zend_throw_exception_ex(zend_class_entry *exception_ce, long code TSRMLS_DC, char *format, ...); diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index ecc0f9bb2a..7852c55f76 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -127,7 +127,7 @@ static inline void zend_pzval_unlock_free_func(zval *z) (z)->value = (v)->value; \ Z_TYPE_P(z) = Z_TYPE_P(v); \ (z)->refcount = 1; \ - (z)->is_ref = 0; + (z)->is_ref = 0; #define MAKE_REAL_ZVAL_PTR(val) \ do { \ @@ -153,7 +153,7 @@ ZEND_API zval** zend_get_compiled_variable_value(zend_execute_data *execute_data static inline void zend_get_cv_address(zend_uchar utype, zend_compiled_variable *cv, zval ***ptr, temp_variable *Ts TSRMLS_DC) { zval *new_zval = &EG(uninitialized_zval); - + new_zval->refcount++; zend_u_hash_quick_update(EG(active_symbol_table), utype, cv->name, cv->name_len+1, cv->hash_value, &new_zval, sizeof(zval *), (void **)ptr); } @@ -219,7 +219,7 @@ static inline zval *_get_zval_ptr_var(znode *node, temp_variable *Ts, zend_free_ static inline zval *_get_zval_ptr_cv(znode *node, temp_variable *Ts, int type TSRMLS_DC) { zval ***ptr = &CV_OF(node->u.var); - + if (!*ptr) { zend_compiled_variable *cv = &CV_DEF_OF(node->u.var); zend_uchar utype = UG(unicode)?IS_UNICODE:IS_STRING; @@ -289,7 +289,7 @@ static inline zval **_get_zval_ptr_ptr_var(znode *node, temp_variable *Ts, zend_ static inline zval **_get_zval_ptr_ptr_cv(znode *node, temp_variable *Ts, int type TSRMLS_DC) { zval ***ptr = &CV_OF(node->u.var); - + if (!*ptr) { zend_compiled_variable *cv = &CV_DEF_OF(node->u.var); zend_uchar utype = UG(unicode)?IS_UNICODE:IS_STRING; @@ -534,7 +534,7 @@ static inline void zend_verify_arg_type(zend_function *zf, zend_uint arg_num, zv if (!arg) { if (ptr && ptr->op_array) { zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an array, called in %s on line %d and defined", arg_num, fclass, fsep, fname, ptr->op_array->filename, ptr->opline->lineno); - } else { + } else { zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an array", arg_num, fclass, fsep, fname); } } @@ -550,7 +550,7 @@ static inline void zend_verify_arg_type(zend_function *zf, zend_uint arg_num, zv break; case IS_ARRAY: break; - default: + default: if (ptr && ptr->op_array) { zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an array, called in %s on line %d and defined", arg_num, fclass, fsep, fname, ptr->op_array->filename, ptr->opline->lineno); } else { @@ -582,7 +582,7 @@ static inline void zend_assign_to_object(znode *result, zval **object_ptr, znode make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */ object = *object_ptr; - + if (Z_TYPE_P(object) != IS_OBJECT || (opcode == ZEND_ASSIGN_OBJ && !Z_OBJ_HT_P(object)->write_property)) { zend_error(E_WARNING, "Attempt to assign property of non-object"); FREE_OP(free_op2); @@ -593,7 +593,7 @@ static inline void zend_assign_to_object(znode *result, zval **object_ptr, znode FREE_OP(free_value); return; } - + /* here we are sure we are dealing with an object */ /* separate our value if necessary */ @@ -602,7 +602,7 @@ static inline void zend_assign_to_object(znode *result, zval **object_ptr, znode char *class_name; zend_uint class_name_len; int dup; - + ALLOC_ZVAL(value); *value = *orig_value; value->is_ref = 0; @@ -611,7 +611,7 @@ static inline void zend_assign_to_object(znode *result, zval **object_ptr, znode if (Z_OBJ_HANDLER_P(value, clone_obj) == NULL) { zend_error_noreturn(E_ERROR, "Trying to clone an uncloneable object of class %v", class_name); } - zend_error(E_STRICT, "Implicit cloning object of class '%v' because of 'zend.ze1_compatibility_mode'", class_name); + zend_error(E_STRICT, "Implicit cloning object of class '%v' because of 'zend.ze1_compatibility_mode'", class_name); Z_OBJVAL_P(value) = Z_OBJ_HANDLER_P(orig_value, clone_obj)(orig_value TSRMLS_CC); if (!dup) { efree(class_name); @@ -632,7 +632,7 @@ static inline void zend_assign_to_object(znode *result, zval **object_ptr, znode value->refcount = 0; zval_copy_ctor(value); } - + value->refcount++; if (opcode == ZEND_ASSIGN_OBJ) { @@ -650,7 +650,7 @@ static inline void zend_assign_to_object(znode *result, zval **object_ptr, znode } Z_OBJ_HT_P(object)->write_dimension(object, property_name, value TSRMLS_CC); } - + if (result && !RETURN_VALUE_UNUSED(result)) { T(result->u.var).var.ptr = value; T(result->u.var).var.ptr_ptr = &T(result->u.var).var.ptr; /* this is so that we could use it in FETCH_DIM_R, etc. - see bug #27876 */ @@ -671,7 +671,7 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2 zend_free_op free_op1; zval **variable_ptr_ptr = get_zval_ptr_ptr(op1, Ts, &free_op1, BP_VAR_W); zval *variable_ptr; - + if (!variable_ptr_ptr) { temp_variable *T = &T(op1->u.var); @@ -714,7 +714,7 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2 } Z_STRVAL_P(T->str_offset.str)[T->str_offset.offset] = Z_STRVAL_P(final_value)[0]; - + if (op2->op_type == IS_TMP_VAR) { if (final_value == &T(op2->u.var).tmp_var) { /* we can safely free final_value here @@ -779,7 +779,7 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2 } } while (0); /* zval_ptr_dtor(&T->str_offset.str); Nuke this line if it doesn't cause a leak */ - + /* T(result->u.var).var.ptr_ptr = &EG(uninitialized_zval_ptr); */ if (!RETURN_VALUE_UNUSED(result)) { T(result->u.var).var.ptr_ptr = &value; @@ -810,14 +810,14 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2 Z_OBJ_HANDLER_P(variable_ptr, set)(variable_ptr_ptr, value TSRMLS_CC); goto done_setting_var; } - + if (EG(ze1_compatibility_mode) && Z_TYPE_P(value) == IS_OBJECT) { char *class_name; zend_uint class_name_len; int dup; - + dup = zend_get_object_classname(value, &class_name, &class_name_len TSRMLS_CC); - + if (Z_OBJ_HANDLER_P(value, clone_obj) == NULL) { zend_error_noreturn(E_ERROR, "Trying to clone an uncloneable object of class %v", class_name); } else if (PZVAL_IS_REF(variable_ptr)) { @@ -863,7 +863,7 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2 if (variable_ptr!=value) { zend_uint refcount = variable_ptr->refcount; zval garbage; - + if (type!=IS_TMP_VAR) { value->refcount++; } @@ -889,7 +889,7 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2 variable_ptr->refcount++; } else if (PZVAL_IS_REF(value)) { zval tmp; - + tmp = *value; zval_copy_ctor(&tmp); tmp.refcount=1; @@ -936,13 +936,13 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2 } (*variable_ptr_ptr)->is_ref=0; } - + done_setting_var: if (result && !RETURN_VALUE_UNUSED(result)) { T(result->u.var).var.ptr_ptr = variable_ptr_ptr; PZVAL_LOCK(*variable_ptr_ptr); AI_USE_PTR(T(result->u.var).var); - } + } FREE_OP_VAR_PTR(free_op1); } @@ -957,7 +957,7 @@ static inline void zend_receive(zval **variable_ptr_ptr, zval *value TSRMLS_DC) int dup; dup = zend_get_object_classname(value, &class_name, &class_name_len TSRMLS_CC); - + if (Z_OBJ_HANDLER_P(value, clone_obj) == NULL) { zend_error_noreturn(E_ERROR, "Trying to clone an uncloneable object of class %v", class_name); } else { @@ -1042,10 +1042,10 @@ static inline zval **zend_fetch_dimension_address_inner(HashTable *ht, zval *dim goto fetch_string_dim; case IS_STRING: case IS_UNICODE: - + offset_key = Z_UNIVAL_P(dim); offset_key_length = Z_UNILEN_P(dim)+1; - + fetch_string_dim: if (UG(unicode) && ht == &EG(symbol_table) && ztype == IS_UNICODE) { /* Identifier normalization */ @@ -1089,7 +1089,7 @@ fetch_string_dim: zend_error(E_STRICT, "Resource ID#%ld used as offset, casting to integer (%ld)", Z_LVAL_P(dim), Z_LVAL_P(dim)); /* Fall Through */ case IS_DOUBLE: - case IS_BOOL: + case IS_BOOL: case IS_LONG: { long index; @@ -1121,7 +1121,7 @@ fetch_string_dim: } } break; - default: + default: zend_error(E_WARNING, "Illegal offset type"); switch (type) { case BP_VAR_R: @@ -1145,7 +1145,7 @@ static void zend_fetch_dimension_address(temp_variable *result, zval **container if (!container_ptr) { zend_error_noreturn(E_ERROR, "Cannot use string offset as an array"); } - + container = *container_ptr; if (container == EG(error_zval_ptr)) { @@ -1191,7 +1191,7 @@ static void zend_fetch_dimension_address(temp_variable *result, zval **container if (zend_hash_next_index_insert(Z_ARRVAL_P(container), &new_zval, sizeof(zval *), (void **) &retval) == FAILURE) { zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied"); retval = &EG(error_zval_ptr); - new_zval->refcount--; + new_zval->refcount--; } } else { retval = zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), dim, type TSRMLS_CC); @@ -1254,12 +1254,12 @@ static void zend_fetch_dimension_address(temp_variable *result, zval **container zend_error_noreturn(E_ERROR, "Cannot use object as array"); } else { zval *overloaded_result; - + if (dim_is_tmp_var) { zval *orig = dim; MAKE_REAL_ZVAL_PTR(dim); ZVAL_NULL(orig); - } + } overloaded_result = Z_OBJ_HT_P(container)->read_dimension(container, dim, type TSRMLS_CC); if (overloaded_result) { @@ -1292,7 +1292,7 @@ static void zend_fetch_dimension_address(temp_variable *result, zval **container return; } break; - default: { + default: { switch (type) { case BP_VAR_UNSET: zend_error(E_WARNING, "Cannot unset offset in a non-array variable"); @@ -1323,7 +1323,7 @@ static void zend_fetch_dimension_address(temp_variable *result, zval **container static void zend_fetch_property_address(temp_variable *result, zval **container_ptr, zval *prop_ptr, int type TSRMLS_DC) { zval *container; - + container = *container_ptr; if (container == EG(error_zval_ptr)) { if (result) { @@ -1348,7 +1348,7 @@ static void zend_fetch_property_address(temp_variable *result, zval **container_ break; } } - + if (Z_TYPE_P(container) != IS_OBJECT) { if (result) { if (type == BP_VAR_R || type == BP_VAR_IS) { @@ -1360,7 +1360,7 @@ static void zend_fetch_property_address(temp_variable *result, zval **container_ } return; } - + if (Z_OBJ_HT_P(container)->get_property_ptr_ptr) { zval **ptr_ptr = Z_OBJ_HT_P(container)->get_property_ptr_ptr(container, prop_ptr TSRMLS_CC); if (NULL == ptr_ptr) { @@ -1389,10 +1389,10 @@ static void zend_fetch_property_address(temp_variable *result, zval **container_ result->var.ptr_ptr = &EG(error_zval_ptr); } } - + if (result) { PZVAL_LOCK(*result->var.ptr_ptr); - } + } } static inline zend_brk_cont_element* zend_brk_cont(int nest_levels, int array_offset, zend_op_array *op_array, temp_variable *Ts TSRMLS_DC) @@ -1438,7 +1438,7 @@ static int zend_check_symbol(zval **pz TSRMLS_DC) } else if (Z_TYPE_PP(pz) == IS_ARRAY) { zend_hash_apply(Z_ARRVAL_PP(pz), (apply_func_t) zend_check_symbol TSRMLS_CC); } else if (Z_TYPE_PP(pz) == IS_OBJECT) { - + /* OBJ-TBI - doesn't support new object model! */ zend_hash_apply(Z_OBJPROP_PP(pz), (apply_func_t) zend_check_symbol TSRMLS_CC); } diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h index 178277b9f6..a91ff59d82 100644 --- a/Zend/zend_execute.h +++ b/Zend/zend_execute.h @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | @@ -127,7 +127,7 @@ static inline int i_zend_is_true(zval *op) break; } } - + if(EG(ze1_compatibility_mode)) { result = (zend_hash_num_elements(Z_OBJPROP_P(op))?1:0); } else { diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 8b82c0f26d..9caad62b82 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -493,7 +493,7 @@ ZEND_API int zval_update_constant(zval **pp, void *arg TSRMLS_DC) } if (UG(unicode)) { - if (Z_TYPE(const_value) == IS_UNICODE && + if (Z_TYPE(const_value) == IS_UNICODE && Z_USTRLEN(const_value) == str_index_len-1 && !u_strncmp(Z_USTRVAL(const_value), (UChar*)str_index, str_index_len)) { /* constant value is the same as its name */ @@ -502,7 +502,7 @@ ZEND_API int zval_update_constant(zval **pp, void *arg TSRMLS_DC) continue; } } else { - if (Z_TYPE(const_value) == IS_STRING && + if (Z_TYPE(const_value) == IS_STRING && Z_STRLEN(const_value) == str_index_len-1 && !strncmp(Z_STRVAL(const_value), str_index, str_index_len)) { /* constant value is the same as its name */ @@ -682,7 +682,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS zend_class_entry **ce; int found = FAILURE; - if (EG(active_op_array) && + if (EG(active_op_array) && Z_UNILEN_PP(fci->object_pp) == sizeof("self")-1 && ZEND_U_EQUAL(Z_TYPE_PP(fci->object_pp), Z_UNIVAL_PP(fci->object_pp), Z_UNILEN_PP(fci->object_pp), "self", sizeof("self")-1)) { if (!EG(active_op_array)->scope) { @@ -712,7 +712,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS if (found == FAILURE) { zend_error(E_ERROR, "Class '%R' not found", Z_TYPE_PP(fci->object_pp), Z_UNIVAL_PP(fci->object_pp)); } - if (scope && EG(This) && + if (scope && EG(This) && instanceof_function(Z_OBJCE_P(EG(This)), scope TSRMLS_CC) && instanceof_function(scope, *ce TSRMLS_CC)) { fci->object_pp = &EG(This); @@ -794,7 +794,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS if (Z_OBJ_HT_PP(fci->object_pp)->get_method == NULL) { zend_error(E_ERROR, "Object does not support method calls"); } - EX(function_state).function = + EX(function_state).function = Z_OBJ_HT_PP(fci->object_pp)->get_method(fci->object_pp, fname, fname_len TSRMLS_CC); if (EX(function_state).function && calling_scope != EX(function_state).function->common.scope) { void *function_name_lc = zend_u_str_tolower_dup(Z_TYPE_P(fci->function_name), fname, fname_len); @@ -808,7 +808,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS unsigned int lcname_len; char *lcname = zend_u_str_case_fold(Z_TYPE_P(fci->function_name), fname, fname_len, 1, &lcname_len); - EX(function_state).function = + EX(function_state).function = zend_std_get_static_method(calling_scope, lcname, lcname_len TSRMLS_CC); efree(lcname); if (check_scope_or_static && EX(function_state).function @@ -827,7 +827,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS efree(lcname); } - if (EX(function_state).function == NULL) { + if (EX(function_state).function == NULL) { /* try calling __call */ if (calling_scope && calling_scope->__call) { EX(function_state).function = calling_scope->__call; @@ -860,13 +860,13 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS calling_scope = fci_cache->calling_scope; fci->object_pp = fci_cache->object_pp; } - - if (EX(function_state).function->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED)) { + + if (EX(function_state).function->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED)) { if (EX(function_state).function->common.fn_flags & ZEND_ACC_ABSTRACT) { zend_error_noreturn(E_ERROR, "Cannot call abstract method %v::%v()", EX(function_state).function->common.scope->name, EX(function_state).function->common.function_name); } - if (EX(function_state).function->common.fn_flags & ZEND_ACC_DEPRECATED) { - zend_error(E_NOTICE, "Function %s%s%s() is deprecated", + if (EX(function_state).function->common.fn_flags & ZEND_ACC_DEPRECATED) { + zend_error(E_NOTICE, "Function %s%s%s() is deprecated", EX(function_state).function->common.scope ? EX(function_state).function->common.scope->name : "", EX(function_state).function->common.scope ? "::" : "", EX(function_state).function->common.function_name); @@ -1044,7 +1044,7 @@ ZEND_API int zend_u_lookup_class_ex(zend_uchar type, void *name, int name_length if (name == NULL) { return FAILURE; } - + lc_name = zend_u_str_case_fold(type, name, name_length, 1, &lc_name_len); if (zend_u_hash_find(EG(class_table), type, lc_name, lc_name_len+1, (void **) ce) == SUCCESS) { @@ -1064,7 +1064,7 @@ ZEND_API int zend_u_lookup_class_ex(zend_uchar type, void *name, int name_length ALLOC_HASHTABLE(EG(in_autoload)); zend_u_hash_init(EG(in_autoload), 0, NULL, NULL, 0, UG(unicode)); } - + if (zend_u_hash_add(EG(in_autoload), type, lc_name, lc_name_len+1, (void**)&dummy, sizeof(char), NULL) == FAILURE) { efree(lc_name); return FAILURE; @@ -1079,9 +1079,9 @@ ZEND_API int zend_u_lookup_class_ex(zend_uchar type, void *name, int name_length } else { ZVAL_STRINGL(class_name_ptr, name, name_length, 1); } - + args[0] = &class_name_ptr; - + fcall_info.size = sizeof(fcall_info); fcall_info.function_table = EG(function_table); fcall_info.function_name = &autoload_function; @@ -1307,7 +1307,7 @@ void execute_new_code(TSRMLS_D) if (local_retval) { zval_ptr_dtor(&local_retval); } - + if (EG(exception)) { zend_exception_error(EG(exception) TSRMLS_CC); } @@ -1588,9 +1588,9 @@ void zend_verify_abstract_class(zend_class_entry *ce TSRMLS_DC) zend_hash_apply_with_argument(&ce->function_table, (apply_func_arg_t) zend_verify_abstract_class_function, &ai TSRMLS_CC); - if (ai.cnt) { - zend_error(E_ERROR, "Class %v contains %d abstract method%s and must therefore be declared abstract or implement the remaining methods (" MAX_ABSTRACT_INFO_FMT MAX_ABSTRACT_INFO_FMT MAX_ABSTRACT_INFO_FMT ")", - ce->name, ai.cnt, + if (ai.cnt) { + zend_error(E_ERROR, "Class %v contains %d abstract method%s and must therefore be declared abstract or implement the remaining methods (" MAX_ABSTRACT_INFO_FMT MAX_ABSTRACT_INFO_FMT MAX_ABSTRACT_INFO_FMT ")", + ce->name, ai.cnt, ai.cnt > 1 ? "s" : "", DISPLAY_ABSTRACT_FN(0), DISPLAY_ABSTRACT_FN(1), diff --git a/Zend/zend_extensions.c b/Zend/zend_extensions.c index 34d0636d2c..8696386041 100644 --- a/Zend/zend_extensions.c +++ b/Zend/zend_extensions.c @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | @@ -78,7 +78,7 @@ int zend_load_extension(char *path) new_extension->name); DL_UNLOAD(handle); return FAILURE; - } + } } else if (ZTS_V!=extension_version_info->thread_safe) { fprintf(stderr, "Cannot load %s - it %s thread safe, whereas Zend %s\n", new_extension->name, @@ -229,10 +229,10 @@ ZEND_API zend_extension *zend_get_extension(char *extension_name) * Support for dynamic loading of MH_BUNDLEs on Darwin / Mac OS X * */ - + #if HAVE_MACH_O_DYLD_H -void *zend_mh_bundle_load(char* bundle_path) +void *zend_mh_bundle_load(char* bundle_path) { NSObjectFileImage bundle_image; NSModule bundle_handle; @@ -242,17 +242,17 @@ void *zend_mh_bundle_load(char* bundle_path) if (NSCreateObjectFileImageFromFile(bundle_path, &bundle_image) != NSObjectFileImageSuccess) { return NULL; } - + bundle_handle = NSLinkModule(bundle_image, bundle_path, NSLINKMODULE_OPTION_PRIVATE); NSDestroyObjectFileImage(bundle_image); - + /* call the init function of the bundle */ bundle_init_nssymbol = NSLookupSymbolInModule(bundle_handle, "__init"); if (bundle_init_nssymbol != NULL) { bundle_init = NSAddressOfSymbol(bundle_init_nssymbol); bundle_init(); } - + return bundle_handle; } @@ -260,14 +260,14 @@ int zend_mh_bundle_unload(void *bundle_handle) { NSSymbol bundle_fini_nssymbol; void (*bundle_fini)(void); - + /* call the fini function of the bundle */ bundle_fini_nssymbol = NSLookupSymbolInModule(bundle_handle, "__fini"); if (bundle_fini_nssymbol != NULL) { bundle_fini = NSAddressOfSymbol(bundle_fini_nssymbol); bundle_fini(); } - + return (int) NSUnLinkModule(bundle_handle, NULL); } diff --git a/Zend/zend_extensions.h b/Zend/zend_extensions.h index 13c96eaa6a..268f013663 100644 --- a/Zend/zend_extensions.h +++ b/Zend/zend_extensions.h @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | @@ -72,7 +72,7 @@ struct _zend_extension { op_array_handler_func_t op_array_handler; - statement_handler_func_t statement_handler; + statement_handler_func_t statement_handler; fcall_begin_handler_func_t fcall_begin_handler; fcall_end_handler_func_t fcall_end_handler; diff --git a/Zend/zend_fast_cache.h b/Zend/zend_fast_cache.h index 2c22b58a55..3359a26d4a 100644 --- a/Zend/zend_fast_cache.h +++ b/Zend/zend_fast_cache.h @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | diff --git a/Zend/zend_globals_macros.h b/Zend/zend_globals_macros.h index 65169c3031..92ac2bcf28 100644 --- a/Zend/zend_globals_macros.h +++ b/Zend/zend_globals_macros.h @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c index 2d15a50bef..501a2fef94 100644 --- a/Zend/zend_hash.c +++ b/Zend/zend_hash.c @@ -1694,10 +1694,10 @@ ZEND_API int zend_u_symtable_update_current_key(HashTable *ht, zend_uchar type, zend_uchar key_type; if (type == IS_STRING) { - key_type = HASH_KEY_IS_STRING; + key_type = HASH_KEY_IS_STRING; HANDLE_NUMERIC((char*)arKey, nKeyLength, zend_hash_update_current_key(ht, HASH_KEY_IS_LONG, NULL, 0, idx)); } else if (type == IS_UNICODE) { - key_type = HASH_KEY_IS_UNICODE; + key_type = HASH_KEY_IS_UNICODE; HANDLE_U_NUMERIC((UChar*)arKey, nKeyLength, zend_hash_update_current_key(ht, HASH_KEY_IS_LONG, NULL, 0, idx)); } return zend_hash_update_current_key(ht, key_type, arKey, nKeyLength, 0); diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h index 19a8f2c03f..942a718044 100644 --- a/Zend/zend_hash.h +++ b/Zend/zend_hash.h @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | @@ -268,7 +268,7 @@ ZEND_API int zend_hash_rehash(HashTable *ht); * numbers are not useable at all. The remaining 128 odd numbers * (except for the number 1) work more or less all equally well. They * all distribute in an acceptable way and this way fill a hash table - * with an average percent of approx. 86%. + * with an average percent of approx. 86%. * * If one compares the Chi^2 values of the variants, the number 33 not * even has the best value. But the number 33 and a few other equally diff --git a/Zend/zend_highlight.c b/Zend/zend_highlight.c index be25855fb2..797ef83c5a 100644 --- a/Zend/zend_highlight.c +++ b/Zend/zend_highlight.c @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | @@ -104,10 +104,10 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini case T_CONSTANT_ENCAPSED_STRING: next_color = syntax_highlighter_ini->highlight_string; break; - case '"': + case '"': next_color = syntax_highlighter_ini->highlight_string; in_string = !in_string; - break; + break; case T_WHITESPACE: zend_html_puts(LANG_SCNG(yy_text), LANG_SCNG(yy_leng) TSRMLS_CC); /* no color needed */ Z_TYPE(token) = 0; @@ -193,7 +193,7 @@ ZEND_API void zend_strip(TSRMLS_D) case EOF: return; - + case T_END_HEREDOC: zend_write(LANG_SCNG(yy_text), LANG_SCNG(yy_leng)); efree(Z_STRVAL(token)); @@ -205,7 +205,7 @@ ZEND_API void zend_strip(TSRMLS_D) prev_space = 1; Z_TYPE(token) = 0; continue; - + default: zend_write(LANG_SCNG(yy_text), LANG_SCNG(yy_leng)); break; @@ -238,4 +238,3 @@ ZEND_API void zend_strip(TSRMLS_D) * indent-tabs-mode: t * End: */ - diff --git a/Zend/zend_highlight.h b/Zend/zend_highlight.h index 555198666e..223f528730 100644 --- a/Zend/zend_highlight.h +++ b/Zend/zend_highlight.h @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | diff --git a/Zend/zend_indent.c b/Zend/zend_indent.c index a8ec19243a..34596382dc 100644 --- a/Zend/zend_indent.c +++ b/Zend/zend_indent.c @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | diff --git a/Zend/zend_indent.h b/Zend/zend_indent.h index d6540641a4..b4001d4852 100644 --- a/Zend/zend_indent.h +++ b/Zend/zend_indent.h @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c index dcaf59fc2c..baa3d9a4e4 100644 --- a/Zend/zend_ini.c +++ b/Zend/zend_ini.c @@ -26,7 +26,7 @@ #include "zend_operators.h" #include "zend_strtod.h" -static HashTable *registered_zend_ini_directives; +static HashTable *registered_zend_ini_directives; #define NO_VALUE_PLAINTEXT "no value" #define NO_VALUE_HTML "no value" @@ -123,7 +123,7 @@ static int ini_key_compare(const void *a, const void *b TSRMLS_DC) { Bucket *f; Bucket *s; - + f = *((Bucket **) a); s = *((Bucket **) b); @@ -232,7 +232,7 @@ ZEND_API int zend_alter_ini_entry(char *name, uint name_length, char *new_value, } duplicate = estrndup(new_value, new_value_length); - + if (!ini_entry->on_modify || ini_entry->on_modify(ini_entry, duplicate, new_value_length, ini_entry->mh_arg1, ini_entry->mh_arg2, ini_entry->mh_arg3, stage TSRMLS_CC)==SUCCESS) { if (!ini_entry->modified) { @@ -354,7 +354,7 @@ static void zend_ini_displayer_cb(zend_ini_entry *ini_entry, int type) } else { display_string = NO_VALUE_PLAINTEXT; display_string_length = sizeof(NO_VALUE_PLAINTEXT)-1; - } + } } } else if (ini_entry->value && ini_entry->value[0]) { display_string = ini_entry->value; @@ -366,7 +366,7 @@ static void zend_ini_displayer_cb(zend_ini_entry *ini_entry, int type) } else { display_string = NO_VALUE_PLAINTEXT; display_string_length = sizeof(NO_VALUE_PLAINTEXT)-1; - } + } } ZEND_WRITE(display_string, display_string_length); } @@ -401,7 +401,7 @@ ZEND_INI_DISP(zend_ini_boolean_displayer_cb) else { value = atoi(tmp_value); } - + if (value) { ZEND_PUTS("On"); } else { @@ -426,13 +426,13 @@ ZEND_INI_DISP(zend_ini_color_displayer_cb) zend_printf("%s", value, value); } else { ZEND_PUTS(value); - } + } } else { if (zend_uv.html_errors) { ZEND_PUTS(NO_VALUE_HTML); } else { ZEND_PUTS(NO_VALUE_PLAINTEXT); - } + } } } @@ -476,13 +476,13 @@ ZEND_API ZEND_INI_MH(OnUpdateBool) if (new_value_length==2 && strcasecmp("on", new_value)==0) { *p = (zend_bool) 1; - } + } else if (new_value_length==3 && strcasecmp("yes", new_value)==0) { *p = (zend_bool) 1; - } + } else if (new_value_length==4 && strcasecmp("true", new_value)==0) { *p = (zend_bool) 1; - } + } else { *p = (zend_bool) atoi(new_value); } diff --git a/Zend/zend_ini.h b/Zend/zend_ini.h index d0f1321b94..7234a0be2e 100644 --- a/Zend/zend_ini.h +++ b/Zend/zend_ini.h @@ -130,7 +130,7 @@ END_EXTERN_C() #define ZEND_INI_ENTRY1(name, default_value, modifiable, on_modify, arg1) \ ZEND_INI_ENTRY1_EX(name, default_value, modifiable, on_modify, arg1, NULL) - + #define ZEND_INI_ENTRY_EX(name, default_value, modifiable, on_modify, displayer) \ ZEND_INI_ENTRY3_EX(name, default_value, modifiable, on_modify, NULL, NULL, NULL, displayer) diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c index cd1bc70874..46a18e7332 100755 --- a/Zend/zend_interfaces.c +++ b/Zend/zend_interfaces.c @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | @@ -29,7 +29,7 @@ ZEND_API zend_class_entry *zend_ce_iterator; ZEND_API zend_class_entry *zend_ce_arrayaccess; ZEND_API zend_class_entry *zend_ce_serializable; -/* {{{ zend_call_method +/* {{{ zend_call_method Only returns the returned zval if retval_ptr != NULL */ ZEND_API zval* zend_call_method(zval **object_pp, zend_class_entry *obj_ce, zend_function **fn_proxy, char *function_name, int function_name_len, zval **retval_ptr_ptr, int param_count, zval* arg1, zval* arg2 TSRMLS_DC) { @@ -149,7 +149,7 @@ ZEND_API int zend_user_it_valid(zend_object_iterator *_iter TSRMLS_DC) zval *object = (zval*)iter->it.data; zval *more; int result; - + zend_call_method_with_0_params(&object, iter->ce, &iter->ce->iterator_funcs.zf_valid, "valid", &more); if (more) { result = i_zend_is_true(more); @@ -202,7 +202,7 @@ ZEND_API int zend_user_it_get_current_key(zend_object_iterator *_iter, char **st return HASH_KEY_IS_LONG; } switch (Z_TYPE_P(retval)) { - default: + default: zend_error(E_WARNING, "Illegal type returned from %v::key()", iter->ce->name); case IS_NULL: *int_key = 0; @@ -223,7 +223,7 @@ ZEND_API int zend_user_it_get_current_key(zend_object_iterator *_iter, char **st case IS_DOUBLE: case IS_RESOURCE: - case IS_BOOL: + case IS_BOOL: case IS_LONG: { if (Z_TYPE_P(retval) == IS_DOUBLE) { *int_key = (long)Z_DVAL_P(retval); @@ -273,7 +273,7 @@ zend_object_iterator_funcs zend_interface_iterator_funcs_iterator = { static zend_object_iterator *zend_user_it_get_iterator(zend_class_entry *ce, zval *object, int by_ref TSRMLS_DC) { zend_user_iterator *iterator; - + if (by_ref) { zend_error(E_ERROR, "An iterator cannot be used with foreach by reference"); } @@ -459,14 +459,14 @@ int zend_user_unserialize(zval **object, zend_class_entry *ce, const unsigned ch zval * zdata; object_init_ex(*object, ce); - + MAKE_STD_ZVAL(zdata); ZVAL_STRINGL(zdata, (char*)buf, buf_len, 1); zend_call_method_with_1_params(object, ce, &ce->unserialize_func, "unserialize", NULL, zdata); - + zval_ptr_dtor(&zdata); - + if (EG(exception)) { return FAILURE; } else { @@ -517,7 +517,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_arrayaccess_offset_get, 0, 0, 1) /* actually this ZEND_END_ARG_INFO(); static -ZEND_BEGIN_ARG_INFO_EX(arginfo_arrayaccess_offset_value, 0, 0, 2) +ZEND_BEGIN_ARG_INFO_EX(arginfo_arrayaccess_offset_value, 0, 0, 2) ZEND_ARG_INFO(0, offset) ZEND_ARG_INFO(0, value) ZEND_END_ARG_INFO(); @@ -537,7 +537,7 @@ ZEND_END_ARG_INFO(); 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) + ZEND_FENTRY(unserialize, NULL, arginfo_serializable_serialize, ZEND_ACC_PUBLIC|ZEND_ACC_ABSTRACT|ZEND_ACC_CTOR) {NULL, NULL, NULL} }; /* }}} */ @@ -563,9 +563,9 @@ ZEND_API void zend_register_interfaces(TSRMLS_D) REGISTER_ITERATOR_INTERFACE(iterator, Iterator); REGISTER_ITERATOR_IMPLEMENT(iterator, traversable); - + REGISTER_ITERATOR_INTERFACE(arrayaccess, ArrayAccess); - + REGISTER_ITERATOR_INTERFACE(serializable, Serializable) } /* }}} */ diff --git a/Zend/zend_interfaces.h b/Zend/zend_interfaces.h index d7674b924b..81cadfb907 100755 --- a/Zend/zend_interfaces.h +++ b/Zend/zend_interfaces.h @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | diff --git a/Zend/zend_istdiostream.h b/Zend/zend_istdiostream.h index 0337305629..8957ea989d 100644 --- a/Zend/zend_istdiostream.h +++ b/Zend/zend_istdiostream.h @@ -1,4 +1,4 @@ -/* +/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ diff --git a/Zend/zend_iterators.c b/Zend/zend_iterators.c index 7de3a26f09..4a43f44143 100755 --- a/Zend/zend_iterators.c +++ b/Zend/zend_iterators.c @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | @@ -64,7 +64,7 @@ static void iter_wrapper_dtor(void *object, zend_object_handle handle TSRMLS_DC) ZEND_API zval *zend_iterator_wrap(zend_object_iterator *iter TSRMLS_DC) { zval *wrapped; - + MAKE_STD_ZVAL(wrapped); Z_TYPE_P(wrapped) = IS_OBJECT; Z_OBJ_HANDLE_P(wrapped) = zend_objects_store_put(iter, iter_wrapper_dtor, NULL, NULL TSRMLS_CC); @@ -86,14 +86,14 @@ ZEND_API enum zend_object_iterator_kind zend_iterator_unwrap( return ZEND_ITER_PLAIN_OBJECT; } return ZEND_ITER_INVALID; - - + + case IS_ARRAY: if (HASH_OF(array_ptr)) { return ZEND_ITER_PLAIN_ARRAY; } return ZEND_ITER_INVALID; - + default: return ZEND_ITER_INVALID; } diff --git a/Zend/zend_iterators.h b/Zend/zend_iterators.h index 4400507b77..664e2ca42a 100755 --- a/Zend/zend_iterators.h +++ b/Zend/zend_iterators.h @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | @@ -31,7 +31,7 @@ typedef struct _zend_object_iterator zend_object_iterator; typedef struct _zend_object_iterator_funcs { /* release all resources associated with this iterator instance */ void (*dtor)(zend_object_iterator *iter TSRMLS_DC); - + /* check for end of iteration (FAILURE or SUCCESS if data is valid) */ int (*valid)(zend_object_iterator *iter TSRMLS_DC); @@ -46,7 +46,7 @@ typedef struct _zend_object_iterator_funcs { /* rewind to start of data (optional, may be NULL) */ void (*rewind)(zend_object_iterator *iter TSRMLS_DC); - + /* invalidate current value/key (optional, may be NULL) */ void (*invalidate_current)(zend_object_iterator *iter TSRMLS_DC); } zend_object_iterator_funcs; diff --git a/Zend/zend_language_scanner.h b/Zend/zend_language_scanner.h index 055d293d84..3742e817d0 100644 --- a/Zend/zend_language_scanner.h +++ b/Zend/zend_language_scanner.h @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | @@ -34,7 +34,7 @@ typedef struct _zend_lex_state { UConverter *output_conv; /* converter for data from flex output */ zend_bool encoding_checked; char* rest_str; - int rest_len; + int rest_len; } zend_lex_state; diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l index a5beb25b3c..0f5b067b06 100644 --- a/Zend/zend_language_scanner.l +++ b/Zend/zend_language_scanner.l @@ -234,7 +234,7 @@ BEGIN_EXTERN_C() ZEND_API void zend_file_handle_dtor(zend_file_handle *fh) { TSRMLS_FETCH(); - + switch (fh->type) { case ZEND_HANDLE_FP: fclose(fh->handle.fp); @@ -498,7 +498,7 @@ static int is_encoding_flex_compatible(const char *enc TSRMLS_DC) case UCNV_EBCDIC_STATEFUL: case UCNV_ISO_2022: case UCNV_LMBCS_1: - case UCNV_LMBCS_2: + case UCNV_LMBCS_2: case UCNV_LMBCS_3: case UCNV_LMBCS_4: case UCNV_LMBCS_5: @@ -743,7 +743,7 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle TSRMLS_DC) } zend_llist_add_element(&CG(open_files), file_handle); - + /* Reset the scanner for scanning the new file */ SCNG(yy_in) = file_handle; @@ -1961,7 +1961,7 @@ NEWLINE ("\r"|"\n"|"\r\n") } Z_STRVAL_P(zendlval) = emalloc(len+1); - Z_STRLEN_P(zendlval) = sprintf(Z_STRVAL_P(zendlval), "%s%s%s", + Z_STRLEN_P(zendlval) = sprintf(Z_STRVAL_P(zendlval), "%s%s%s", class_name ? class_name : "", class_name && func_name ? "::" : "", func_name ? func_name : "" diff --git a/Zend/zend_list.c b/Zend/zend_list.c index ded470eb4b..9cb9546958 100644 --- a/Zend/zend_list.c +++ b/Zend/zend_list.c @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | @@ -51,7 +51,7 @@ ZEND_API int zend_list_insert(void *ptr, int type) ZEND_API int _zend_list_delete(int id TSRMLS_DC) { zend_rsrc_list_entry *le; - + if (zend_hash_index_find(&EG(regular_list), id, (void **) &le)==SUCCESS) { /* printf("del(%d): %d->%d\n", id, le->refcount, le->refcount-1); */ if (--le->refcount<=0) { @@ -81,7 +81,7 @@ ZEND_API void *_zend_list_find(int id, int *type TSRMLS_DC) ZEND_API int _zend_list_addref(int id TSRMLS_DC) { zend_rsrc_list_entry *le; - + if (zend_hash_index_find(&EG(regular_list), id, (void **) &le)==SUCCESS) { /* printf("add(%d): %d->%d\n", id, le->refcount, le->refcount+1); */ le->refcount++; @@ -97,7 +97,7 @@ ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int r int rsrc_id; rsrc_id = zend_list_insert(rsrc_pointer, rsrc_type); - + if (rsrc_result) { Z_RESVAL_P(rsrc_result) = rsrc_id; Z_TYPE_P(rsrc_result) = IS_RESOURCE; @@ -171,7 +171,7 @@ void list_entry_destructor(void *ptr) zend_rsrc_list_entry *le = (zend_rsrc_list_entry *) ptr; zend_rsrc_list_dtors_entry *ld; TSRMLS_FETCH(); - + if (zend_hash_index_find(&list_destructors, le->type, (void **) &ld)==SUCCESS) { switch (ld->type) { case ZEND_RESOURCE_LIST_TYPE_STD: @@ -271,11 +271,11 @@ void zend_clean_module_rsrc_dtors(int module_number TSRMLS_DC) ZEND_API int zend_register_list_destructors(void (*ld)(void *), void (*pld)(void *), int module_number) { zend_rsrc_list_dtors_entry lde; - + #if 0 printf("Registering destructors %d for module %d\n", list_destructors.nNextFreeElement, module_number); #endif - + lde.list_dtor=(void (*)(void *)) ld; lde.plist_dtor=(void (*)(void *)) pld; lde.list_dtor_ex = lde.plist_dtor_ex = NULL; @@ -283,7 +283,7 @@ ZEND_API int zend_register_list_destructors(void (*ld)(void *), void (*pld)(void lde.resource_id = list_destructors.nNextFreeElement; lde.type = ZEND_RESOURCE_LIST_TYPE_STD; lde.type_name = NULL; - + if (zend_hash_next_index_insert(&list_destructors, (void *) &lde, sizeof(zend_rsrc_list_dtors_entry), NULL)==FAILURE) { return FAILURE; } @@ -294,7 +294,7 @@ ZEND_API int zend_register_list_destructors(void (*ld)(void *), void (*pld)(void ZEND_API int zend_register_list_destructors_ex(rsrc_dtor_func_t ld, rsrc_dtor_func_t pld, char *type_name, int module_number) { zend_rsrc_list_dtors_entry lde; - + #if 0 printf("Registering destructors %d for module %d\n", list_destructors.nNextFreeElement, module_number); #endif @@ -307,7 +307,7 @@ ZEND_API int zend_register_list_destructors_ex(rsrc_dtor_func_t ld, rsrc_dtor_fu lde.resource_id = list_destructors.nNextFreeElement; lde.type = ZEND_RESOURCE_LIST_TYPE_EX; lde.type_name = type_name; - + if (zend_hash_next_index_insert(&list_destructors, (void *) &lde, sizeof(zend_rsrc_list_dtors_entry), NULL)==FAILURE) { return FAILURE; } diff --git a/Zend/zend_list.h b/Zend/zend_list.h index 434197bbbb..7fe9aebf36 100644 --- a/Zend/zend_list.h +++ b/Zend/zend_list.h @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | diff --git a/Zend/zend_llist.c b/Zend/zend_llist.c index 395821c186..6f01e3ac81 100644 --- a/Zend/zend_llist.c +++ b/Zend/zend_llist.c @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | @@ -107,7 +107,7 @@ ZEND_API void zend_llist_del_element(zend_llist *l, void *element, int (*compare ZEND_API void zend_llist_destroy(zend_llist *l) { zend_llist_element *current=l->head, *next; - + while (current) { next = current->next; if (l->dtor) { @@ -137,7 +137,7 @@ ZEND_API void *zend_llist_remove_tail(zend_llist *l) if (l->tail->prev) { l->tail->prev->next = NULL; } - + data = old_tail->data; l->tail = l->tail->prev; diff --git a/Zend/zend_llist.h b/Zend/zend_llist.h index 1182bf0ce3..95cdd70a1e 100644 --- a/Zend/zend_llist.h +++ b/Zend/zend_llist.h @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | diff --git a/Zend/zend_mm.c b/Zend/zend_mm.c index 06ebdf47e0..cb2ca1f94e 100644 --- a/Zend/zend_mm.c +++ b/Zend/zend_mm.c @@ -146,7 +146,7 @@ static inline void zend_mm_add_to_free_list(zend_mm_heap *heap, zend_mm_free_blo zend_heap_activate_leaf(heap->heap, index); } } else { - free_list_bucket = &heap->free_buckets[0]; + free_list_bucket = &heap->free_buckets[0]; } mm_block->next_free_block = *free_list_bucket; if (*free_list_bucket != NULL) { @@ -230,11 +230,11 @@ zend_bool zend_mm_add_memory_block(zend_mm_heap *heap, size_t block_size) block_size -= ZEND_MM_ALIGNED_SEGMENT_SIZE; mm_block = (zend_mm_free_block *) ((char *) segment + ZEND_MM_ALIGNED_SEGMENT_SIZE); - + mm_block->size = block_size - ZEND_MM_ALIGNED_HEADER_SIZE; /* keep one guard block in the end */ mm_block->type = ZEND_MM_FREE_BLOCK; mm_block->prev_size = 0; /* Size is always at least ZEND_MM_ALIGNED_HEADER_SIZE big (>0) so 0 is OK */ - + /* setup guard block */ guard_block = ZEND_MM_BLOCK_AT(mm_block, mm_block->size); guard_block->type = ZEND_MM_USED_BLOCK; @@ -287,7 +287,7 @@ void *zend_mm_alloc(zend_mm_heap *heap, size_t size) true_size = MAX(ZEND_MM_ALIGNED_SIZE(size)+ZEND_MM_ALIGNED_HEADER_SIZE, ZEND_MM_ALIGNED_FREE_HEADER_SIZE); index = ZEND_MM_BUCKET_INDEX(true_size); - + if (index < ZEND_MM_NUM_BUCKETS) { free_list_bucket = &heap->free_buckets[index]; if (*free_list_bucket) { @@ -299,7 +299,7 @@ void *zend_mm_alloc(zend_mm_heap *heap, size_t size) leaf = zend_heap_search_leaf(heap->heap, index); if (leaf != 0) { best_fit = heap->free_buckets[leaf]; - goto zend_mm_finished_searching_for_block; + goto zend_mm_finished_searching_for_block; } } } @@ -348,7 +348,7 @@ void zend_mm_free(zend_mm_heap *heap, void *p) { zend_mm_block *mm_block = ZEND_MM_HEADER_OF(p); zend_mm_block *prev_block, *next_block; - + if (mm_block->type != ZEND_MM_USED_BLOCK) { /* error */ return; @@ -430,7 +430,7 @@ void *zend_mm_realloc(zend_mm_heap *heap, void *p, size_t size) break; } seg = seg->next_segment; - } + } } mm_block = (zend_mm_block *) ((char *) segment + ZEND_MM_ALIGNED_SEGMENT_SIZE); } @@ -449,7 +449,7 @@ void *zend_mm_realloc(zend_mm_heap *heap, void *p, size_t size) if (next_block->type != ZEND_MM_FREE_BLOCK || (mm_block->size + next_block->size < true_size)) { void *ptr; - + ptr = zend_mm_alloc(heap, size); memcpy(ptr, p, mm_block->size - ZEND_MM_ALIGNED_HEADER_SIZE); zend_mm_free(heap, p); @@ -460,7 +460,7 @@ void *zend_mm_realloc(zend_mm_heap *heap, void *p, size_t size) mm_block->size += next_block->size; /* update the next block's prev_size */ ZEND_MM_BLOCK_AT(mm_block, mm_block->size)->prev_size = mm_block->size; - + zend_mm_create_new_free_block(heap, mm_block, true_size); return p; diff --git a/Zend/zend_modules.h b/Zend/zend_modules.h index 8be64b5b01..8a0c092972 100644 --- a/Zend/zend_modules.h +++ b/Zend/zend_modules.h @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index 6d7ece8ecb..c00e8b6d50 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -1,4 +1,4 @@ -/* +/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ @@ -46,7 +46,7 @@ enable accessors to change properties array. if we have __call and method which is not part of the class function table is - called, we cal __call handler. + called, we cal __call handler. */ static HashTable *zend_std_get_properties(zval *object TSRMLS_DC) @@ -60,13 +60,13 @@ static zval *zend_std_call_getter(zval *object, zval *member TSRMLS_DC) { zval *retval = NULL; zend_class_entry *ce = Z_OBJCE_P(object); - + /* __get handler is called with one argument: property name it should return whether the call was successfull or not */ - + SEPARATE_ARG_IF_REF(member); zend_call_method_with_1_params(&object, ce, &ce->__get, ZEND_GET_FUNC_NAME, &retval, member); @@ -112,11 +112,11 @@ static int zend_std_call_setter(zval *object, zval *member, zval *value TSRMLS_D static void zend_std_call_unsetter(zval *object, zval *member TSRMLS_DC) { zend_class_entry *ce = Z_OBJCE_P(object); - + /* __unset handler is called with one argument: property name */ - + SEPARATE_ARG_IF_REF(member); zend_call_method_with_1_params(&object, ce, &ce->__unset, ZEND_UNSET_FUNC_NAME, NULL, member); @@ -128,13 +128,13 @@ static zval *zend_std_call_issetter(zval *object, zval *member TSRMLS_DC) { zval *retval = NULL; zend_class_entry *ce = Z_OBJCE_P(object); - + /* __isset handler is called with one argument: property name it should return whether the property is set or not */ - + SEPARATE_ARG_IF_REF(member); zend_call_method_with_1_params(&object, ce, &ce->__isset, ZEND_ISSET_FUNC_NAME, &retval, member); @@ -191,7 +191,7 @@ ZEND_API struct _zend_property_info *zend_get_property_info(zend_class_entry *ce zend_error(E_ERROR, "Cannot access property started with '\\0'"); } } - return NULL; + return NULL; } h = zend_u_get_hash_value(Z_TYPE_P(member), Z_UNIVAL_P(member), Z_UNILEN_P(member) + 1); if (zend_u_hash_quick_find(&ce->properties_info, Z_TYPE_P(member), Z_UNIVAL_P(member), Z_UNILEN_P(member)+1, h, (void **) &property_info)==SUCCESS) { @@ -323,7 +323,7 @@ zval *zend_std_read_property(zval *object, zval *member, int type TSRMLS_DC) #if DEBUG_OBJECT_HANDLERS fprintf(stderr, "Read object #%d property: %R\n", Z_OBJ_HANDLE_P(object), Z_TYPE_P(member), Z_STRVAL_P(member)); -#endif +#endif /* make zend_get_property_info silent if we have getter - we may want to use it */ property_info = zend_get_property_info(zobj->ce, member, (zobj->ce->__get != NULL) TSRMLS_CC); @@ -342,7 +342,7 @@ zval *zend_std_read_property(zval *object, zval *member, int type TSRMLS_DC) if (rv) { retval = &rv; } else { - retval = &EG(uninitialized_zval_ptr); + retval = &EG(uninitialized_zval_ptr); } } else { if (!silent) { @@ -435,7 +435,7 @@ zval *zend_std_read_dimension(zval *object, zval *offset, int type TSRMLS_DC) { zend_class_entry *ce = Z_OBJCE_P(object); zval *retval; - + if (instanceof_function_ex(ce, zend_ce_arrayaccess, 1 TSRMLS_CC)) { if(offset == NULL) { /* [] construct */ @@ -488,7 +488,7 @@ static int zend_std_has_dimension(zval *object, zval *offset, int check_empty TS zend_class_entry *ce = Z_OBJCE_P(object); zval *retval; int result; - + if (instanceof_function_ex(ce, zend_ce_arrayaccess, 1 TSRMLS_CC)) { SEPARATE_ARG_IF_REF(offset); zend_call_method_with_1_params(&object, ce, NULL, "offsetexists", &retval, offset); @@ -520,7 +520,7 @@ static zval **zend_std_get_property_ptr_ptr(zval *object, zval *member TSRMLS_DC zval tmp_member; zval **retval; zend_property_info *property_info; - + zobj = Z_OBJ_P(object); if (Z_TYPE_P(member) != IS_UNICODE && (UG(unicode) || Z_TYPE_P(member) != IS_STRING)) { @@ -532,7 +532,7 @@ static zval **zend_std_get_property_ptr_ptr(zval *object, zval *member TSRMLS_DC #if DEBUG_OBJECT_HANDLERS fprintf(stderr, "Ptr object #%d property: %R\n", Z_OBJ_HANDLE_P(object), Z_TYPE_P(member), Z_STRVAL_P(member)); -#endif +#endif property_info = zend_get_property_info(zobj->ce, member, (zobj->ce->__get != NULL) TSRMLS_CC); @@ -566,7 +566,7 @@ static void zend_std_unset_property(zval *object, zval *member TSRMLS_DC) zend_object *zobj; zval *tmp_member = NULL; zend_property_info *property_info; - + zobj = Z_OBJ_P(object); if (Z_TYPE_P(member) != IS_UNICODE && (UG(unicode) || Z_TYPE_P(member) != IS_STRING)) { @@ -579,7 +579,7 @@ static void zend_std_unset_property(zval *object, zval *member TSRMLS_DC) } property_info = zend_get_property_info(zobj->ce, member, (zobj->ce->__unset != NULL) TSRMLS_CC); - + if (!property_info || zend_u_hash_del(zobj->properties, Z_TYPE_P(member), property_info->name, property_info->name_length+1)) { zend_guard *guard; @@ -602,7 +602,7 @@ static void zend_std_unset_property(zval *object, zval *member TSRMLS_DC) static void zend_std_unset_dimension(zval *object, zval *offset TSRMLS_DC) { zend_class_entry *ce = Z_OBJCE_P(object); - + if (instanceof_function_ex(ce, zend_ce_arrayaccess, 1 TSRMLS_CC)) { SEPARATE_ARG_IF_REF(offset); zend_call_method_with_1_params(&object, ce, NULL, "offsetunset", NULL, offset); @@ -619,7 +619,7 @@ ZEND_API void zend_std_call_user_call(INTERNAL_FUNCTION_PARAMETERS) zval *method_name_ptr, *method_args_ptr; zval *method_result_ptr = NULL; zend_class_entry *ce = Z_OBJCE_P(this_ptr); - + ALLOC_ZVAL(method_args_ptr); INIT_PZVAL(method_args_ptr); array_init(method_args_ptr); @@ -648,7 +648,7 @@ ZEND_API void zend_std_call_user_call(INTERNAL_FUNCTION_PARAMETERS) RETVAL_ZVAL(method_result_ptr, 0, 1); } } - + /* now destruct all auxiliaries */ zval_ptr_dtor(&method_args_ptr); zval_ptr_dtor(&method_name_ptr); @@ -738,13 +738,13 @@ static union _zend_function *zend_std_get_method(zval **object_ptr, char *method unsigned int lc_method_name_len; char *lc_method_name; zval *object = *object_ptr; - + /* FIXME: type is default */ zend_uchar type = UG(unicode)?IS_UNICODE:IS_STRING; /* Create a zend_copy_str_tolower(dest, src, src_length); */ lc_method_name = zend_u_str_case_fold(type, method_name, method_len, 1, &lc_method_name_len); - + zobj = Z_OBJ_P(object); if (zend_u_hash_find(&zobj->ce->function_table, type, lc_method_name, lc_method_name_len+1, (void **)&fbc) == FAILURE) { efree(lc_method_name); @@ -837,7 +837,7 @@ ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, char *f /* Ensure that if we're calling a private function, we're allowed to do so. */ - updated_fbc = zend_check_private_int(fbc, EG(scope), function_name_strval, function_name_strlen TSRMLS_CC); + updated_fbc = zend_check_private_int(fbc, EG(scope), function_name_strval, function_name_strlen TSRMLS_CC); if (!updated_fbc) { zend_error(E_ERROR, "Call to %s method %v::%v() from context '%v'", zend_visibility_string(fbc->common.fn_flags), ZEND_FN_SCOPE_NAME(fbc), fbc->common.function_name, EG(scope) ? EG(scope)->name : (char*)EMPTY_STR); } @@ -891,7 +891,7 @@ ZEND_API zval **zend_std_get_static_property(zend_class_entry *ce, zend_uchar ty zend_error(E_ERROR, "Access to undeclared static property: %v::$%R", ce->name, type, property_name); } } - + return retval; } @@ -936,7 +936,7 @@ int zend_compare_symbol_tables_i(HashTable *ht1, HashTable *ht2 TSRMLS_DC); static int zend_std_compare_objects(zval *o1, zval *o2 TSRMLS_DC) { zend_object *zobj1, *zobj2; - + zobj1 = Z_OBJ_P(o1); zobj2 = Z_OBJ_P(o2); @@ -953,7 +953,7 @@ static int zend_std_has_property(zval *object, zval *member, int has_set_exists zval **value; zval *tmp_member = NULL; zend_property_info *property_info; - + zobj = Z_OBJ_P(object); if (Z_TYPE_P(member) != IS_UNICODE && (UG(unicode) || Z_TYPE_P(member) != IS_STRING)) { @@ -967,7 +967,7 @@ static int zend_std_has_property(zval *object, zval *member, int has_set_exists #if DEBUG_OBJECT_HANDLERS fprintf(stderr, "Read object #%d property: %R\n", Z_OBJ_HANDLE_P(object), Z_TYPE_P(member), Z_STRVAL_P(member)); -#endif +#endif property_info = zend_get_property_info(zobj->ce, member, 1 TSRMLS_CC); @@ -1112,7 +1112,7 @@ ZEND_API zend_object_handlers std_object_handlers = { zend_objects_store_add_ref, /* add_ref */ zend_objects_store_del_ref, /* del_ref */ zend_objects_clone_obj, /* clone_obj */ - + zend_std_read_property, /* read_property */ zend_std_write_property, /* write_property */ zend_std_read_dimension, /* read_dimension */ diff --git a/Zend/zend_object_handlers.h b/Zend/zend_object_handlers.h index e0db9b11a0..ebf66f3257 100644 --- a/Zend/zend_object_handlers.h +++ b/Zend/zend_object_handlers.h @@ -1,4 +1,4 @@ -/* +/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ diff --git a/Zend/zend_objects.c b/Zend/zend_objects.c index c53eb82193..0e5e27b6d9 100644 --- a/Zend/zend_objects.c +++ b/Zend/zend_objects.c @@ -1,4 +1,4 @@ -/* +/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ @@ -33,7 +33,7 @@ ZEND_API void zend_objects_destroy_object(zend_object *object, zend_object_handl if (destructor) { zval zobj, *obj = &zobj; zval *old_exception; - + if (destructor->op_array.fn_flags & (ZEND_ACC_PRIVATE|ZEND_ACC_PROTECTED)) { if (destructor->op_array.fn_flags & ZEND_ACC_PRIVATE) { /* Ensure that if we're calling a private function, we're allowed to do so. @@ -41,10 +41,10 @@ ZEND_API void zend_objects_destroy_object(zend_object *object, zend_object_handl if (object->ce != EG(scope)) { zend_class_entry *ce = object->ce; - zend_error(EG(in_execution) ? E_ERROR : E_WARNING, - "Call to private %v::__destruct() from context '%v'%s", - ce->name, - EG(scope) ? EG(scope)->name : (char*)EMPTY_STR, + zend_error(EG(in_execution) ? E_ERROR : E_WARNING, + "Call to private %v::__destruct() from context '%v'%s", + ce->name, + EG(scope) ? EG(scope)->name : (char*)EMPTY_STR, EG(in_execution) ? "" : " during shutdown ignored"); return; } @@ -54,10 +54,10 @@ ZEND_API void zend_objects_destroy_object(zend_object *object, zend_object_handl if (!zend_check_protected(destructor->common.scope, EG(scope))) { zend_class_entry *ce = object->ce; - zend_error(EG(in_execution) ? E_ERROR : E_WARNING, - "Call to protected %v::__destruct() from context '%v'%s", - ce->name, - EG(scope) ? EG(scope)->name : (char*)EMPTY_STR, + zend_error(EG(in_execution) ? E_ERROR : E_WARNING, + "Call to protected %v::__destruct() from context '%v'%s", + ce->name, + EG(scope) ? EG(scope)->name : (char*)EMPTY_STR, EG(in_execution) ? "" : " during shutdown ignored"); return; } @@ -90,7 +90,7 @@ ZEND_API void zend_objects_free_object_storage(zend_object *object TSRMLS_DC) { if (object->guards) { zend_hash_destroy(object->guards); - FREE_HASHTABLE(object->guards); + FREE_HASHTABLE(object->guards); } zend_hash_destroy(object->properties); FREE_HASHTABLE(object->properties); @@ -98,7 +98,7 @@ ZEND_API void zend_objects_free_object_storage(zend_object *object TSRMLS_DC) } ZEND_API zend_object_value zend_objects_new(zend_object **object, zend_class_entry *class_type TSRMLS_DC) -{ +{ zend_object_value retval; *object = emalloc(sizeof(zend_object)); @@ -162,7 +162,7 @@ ZEND_API zend_object_value zend_objects_clone_obj(zval *zobject TSRMLS_DC) zend_object *new_object; zend_object_handle handle = Z_OBJ_HANDLE_P(zobject); - /* assume that create isn't overwritten, so when clone depends on the + /* assume that create isn't overwritten, so when clone depends on the * overwritten one then it must itself be overwritten */ old_object = zend_objects_get_address(zobject TSRMLS_CC); new_obj_val = zend_objects_new(&new_object, old_object->ce TSRMLS_CC); diff --git a/Zend/zend_objects.h b/Zend/zend_objects.h index 082e8d1a5f..b1d50379f4 100644 --- a/Zend/zend_objects.h +++ b/Zend/zend_objects.h @@ -1,4 +1,4 @@ -/* +/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ diff --git a/Zend/zend_objects_API.c b/Zend/zend_objects_API.c index 4cc688dfa2..ad11a70af0 100644 --- a/Zend/zend_objects_API.c +++ b/Zend/zend_objects_API.c @@ -1,4 +1,4 @@ -/* +/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ @@ -96,7 +96,7 @@ ZEND_API zend_object_handle zend_objects_store_put(void *object, zend_objects_st { zend_object_handle handle; struct _store_object *obj; - + if (EG(objects_store).free_list_head != -1) { handle = EG(objects_store).free_list_head; EG(objects_store).free_list_head = EG(objects_store).object_buckets[handle].bucket.free_list.next; @@ -143,14 +143,14 @@ ZEND_API void zend_objects_store_del_ref(zval *zobject TSRMLS_DC) { zend_object_handle handle; struct _store_object *obj; - + if (!EG(objects_store).object_buckets) { return; } handle = Z_OBJ_HANDLE_P(zobject); obj = &EG(objects_store).object_buckets[handle].bucket.obj; - + /* Make sure we hold a reference count during the destructor call otherwise, when the destructor ends the storage might be freed when the refcount reaches 0 a second time @@ -194,16 +194,16 @@ ZEND_API zend_object_value zend_objects_store_clone_obj(zval *zobject TSRMLS_DC) zend_object_handle handle = Z_OBJ_HANDLE_P(zobject); obj = &EG(objects_store).object_buckets[handle].bucket.obj; - + if (obj->clone == NULL) { zend_error(E_CORE_ERROR, "Trying to clone uncloneable object of class %v", Z_OBJCE_P(zobject)->name); - } + } obj->clone(obj->object, &new_object TSRMLS_CC); retval.handle = zend_objects_store_put(new_object, obj->dtor, obj->free_storage, obj->clone TSRMLS_CC); retval.handlers = Z_OBJ_HT_P(zobject); - + return retval; } @@ -276,7 +276,7 @@ ZEND_API zval *zend_object_create_proxy(zval *object, zval *member TSRMLS_DC) Z_TYPE_P(retval) = IS_OBJECT; Z_OBJ_HANDLE_P(retval) = zend_objects_store_put(pobj, NULL, (zend_objects_free_object_storage_t) zend_objects_proxy_free_storage, (zend_objects_store_clone_t) zend_objects_proxy_clone TSRMLS_CC); Z_OBJ_HT_P(retval) = &zend_object_proxy_handlers; - + return retval; } @@ -311,7 +311,7 @@ ZEND_API zend_object_handlers *zend_get_std_object_handlers() static zend_object_handlers zend_object_proxy_handlers = { ZEND_OBJECTS_STORE_HANDLERS, - + NULL, /* read_property */ NULL, /* write_property */ NULL, /* read dimension */ diff --git a/Zend/zend_objects_API.h b/Zend/zend_objects_API.h index f4c505d21a..e3e2412b52 100644 --- a/Zend/zend_objects_API.h +++ b/Zend/zend_objects_API.h @@ -1,4 +1,4 @@ -/* +/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c index 83bdaceb64..b80bae90c6 100644 --- a/Zend/zend_opcode.c +++ b/Zend/zend_opcode.c @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | @@ -135,7 +135,7 @@ ZEND_API int zend_cleanup_function_data(zend_function *function TSRMLS_DC) { if (function->type == ZEND_USER_FUNCTION) { zend_cleanup_op_array_data((zend_op_array *) function); - } + } return 0; } @@ -162,7 +162,7 @@ ZEND_API int zend_cleanup_class_data(zend_class_entry **pce TSRMLS_DC) ZEND_API void destroy_zend_class(zend_class_entry **pce) { zend_class_entry *ce = *pce; - + if (--ce->refcount > 0) { return; } @@ -296,9 +296,9 @@ zend_op *get_next_op(zend_op_array *op_array TSRMLS_DC) op_array->size *= 4; op_array_alloc_ops(op_array); } - + next_op = &(op_array->opcodes[next_op_num]); - + init_op(next_op TSRMLS_CC); return next_op; @@ -388,7 +388,7 @@ int pass_two(zend_op_array *op_array TSRMLS_DC) ZEND_VM_SET_OPCODE_HANDLER(opline); opline++; } - + op_array->done_pass_two = 1; return 0; } diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 82d8908cd5..19fdc48697 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | @@ -462,7 +462,7 @@ ZEND_API void convert_to_double(zval *op) { double retval = 1.0; TSRMLS_FETCH(); - + convert_object_to_type(op, IS_DOUBLE, convert_to_double); if (Z_TYPE_P(op) == IS_DOUBLE) { @@ -481,7 +481,7 @@ ZEND_API void convert_to_double(zval *op) zval_dtor(op); ZVAL_DOUBLE(op, retval); break; - } + } default: zend_error(E_WARNING, "Cannot convert to real value (type=%d)", Z_TYPE_P(op)); zval_dtor(op); @@ -578,14 +578,14 @@ ZEND_API void convert_to_boolean(zval *op) if (Z_TYPE_P(op) == IS_BOOL) { return; } - + if (EG(ze1_compatibility_mode)) { HashTable *ht = Z_OBJPROP_P(op); if (ht) { retval = (zend_hash_num_elements(ht)?1:0); } } - + zval_dtor(op); ZVAL_BOOL(op, retval); break; @@ -640,7 +640,7 @@ ZEND_API void _convert_to_unicode(zval *op TSRMLS_DC ZEND_FILE_LINE_DC) int32_t capacity; double dval = Z_DVAL_P(op); TSRMLS_FETCH(); - + capacity = MAX_LENGTH_OF_DOUBLE + EG(precision) + 1; Z_USTRVAL_P(op) = eumalloc_rel(capacity); Z_USTRLEN_P(op) = u_sprintf(Z_USTRVAL_P(op), "%.*G", (int) EG(precision), dval); @@ -654,7 +654,7 @@ ZEND_API void _convert_to_unicode(zval *op TSRMLS_DC ZEND_FILE_LINE_DC) break; case IS_OBJECT: { TSRMLS_FETCH(); - + convert_object_to_type(op, IS_UNICODE, convert_to_unicode); if (Z_TYPE_P(op) == IS_UNICODE) { @@ -737,7 +737,7 @@ ZEND_API void _convert_to_string_with_converter(zval *op, UConverter *conv TSRML break; case IS_OBJECT: { TSRMLS_FETCH(); - + convert_object_to_type(op, IS_STRING, convert_to_string); if (Z_TYPE_P(op) == IS_STRING) { @@ -762,11 +762,11 @@ ZEND_API void _convert_to_string_with_converter(zval *op, UConverter *conv TSRML static void convert_scalar_to_array(zval *op, int type TSRMLS_DC) { zval *entry; - + ALLOC_ZVAL(entry); *entry = *op; INIT_PZVAL(entry); - + switch (type) { case IS_ARRAY: ALLOC_HASHTABLE(Z_ARRVAL_P(op)); @@ -862,14 +862,14 @@ ZEND_API void multi_convert_to_long_ex(int argc, ...) { zval **arg; va_list ap; - + va_start(ap, argc); while (argc--) { arg = va_arg(ap, zval **); convert_to_long_ex(arg); } - + va_end(ap); } @@ -877,14 +877,14 @@ ZEND_API void multi_convert_to_double_ex(int argc, ...) { zval **arg; va_list ap; - + va_start(ap, argc); - while (argc--) { + while (argc--) { arg = va_arg(ap, zval **); convert_to_double_ex(arg); } - + va_end(ap); } @@ -892,14 +892,14 @@ ZEND_API void multi_convert_to_string_ex(int argc, ...) { zval **arg; va_list ap; - + va_start(ap, argc); - while (argc--) { + while (argc--) { arg = va_arg(ap, zval **); convert_to_string_ex(arg); } - + va_end(ap); } @@ -927,9 +927,9 @@ ZEND_API int add_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) if (Z_TYPE_P(op1) == IS_LONG && Z_TYPE_P(op2) == IS_LONG) { long lval = Z_LVAL_P(op1) + Z_LVAL_P(op2); - + /* check for overflow by comparing sign bits */ - if ( (Z_LVAL_P(op1) & LONG_SIGN_MASK) == (Z_LVAL_P(op2) & LONG_SIGN_MASK) + if ( (Z_LVAL_P(op1) & LONG_SIGN_MASK) == (Z_LVAL_P(op2) & LONG_SIGN_MASK) && (Z_LVAL_P(op1) & LONG_SIGN_MASK) != (lval & LONG_SIGN_MASK)) { Z_DVAL_P(result) = (double) Z_LVAL_P(op1) + (double) Z_LVAL_P(op2); @@ -961,15 +961,15 @@ ZEND_API int add_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) ZEND_API int sub_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) { zval op1_copy, op2_copy; - + zendi_convert_scalar_to_number(op1, op1_copy, result); zendi_convert_scalar_to_number(op2, op2_copy, result); if (Z_TYPE_P(op1) == IS_LONG && Z_TYPE_P(op2) == IS_LONG) { long lval = Z_LVAL_P(op1) - Z_LVAL_P(op2); - + /* check for overflow by comparing sign bits */ - if ( (Z_LVAL_P(op1) & LONG_SIGN_MASK) != (Z_LVAL_P(op2) & LONG_SIGN_MASK) + if ( (Z_LVAL_P(op1) & LONG_SIGN_MASK) != (Z_LVAL_P(op2) & LONG_SIGN_MASK) && (Z_LVAL_P(op1) & LONG_SIGN_MASK) != (lval & LONG_SIGN_MASK)) { Z_DVAL_P(result) = (double) Z_LVAL_P(op1) - (double) Z_LVAL_P(op2); @@ -1001,7 +1001,7 @@ ZEND_API int sub_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) ZEND_API int mul_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) { zval op1_copy, op2_copy; - + zendi_convert_scalar_to_number(op1, op1_copy, result); zendi_convert_scalar_to_number(op2, op2_copy, result); @@ -1009,7 +1009,7 @@ ZEND_API int mul_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) long overflow; ZEND_SIGNED_MULTIPLY_LONG(Z_LVAL_P(op1), Z_LVAL_P(op2), Z_LVAL_P(result), Z_DVAL_P(result),overflow); - Z_TYPE_P(result) = overflow ? IS_DOUBLE : IS_LONG; + Z_TYPE_P(result) = overflow ? IS_DOUBLE : IS_LONG; return SUCCESS; } if ((Z_TYPE_P(op1) == IS_DOUBLE && Z_TYPE_P(op2) == IS_LONG) @@ -1032,7 +1032,7 @@ ZEND_API int mul_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) ZEND_API int div_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) { zval op1_copy, op2_copy; - + zendi_convert_scalar_to_number(op1, op1_copy, result); zendi_convert_scalar_to_number(op2, op2_copy, result); @@ -1072,7 +1072,7 @@ ZEND_API int div_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) ZEND_API int mod_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) { zval op1_copy, op2_copy; - + zendi_convert_to_long(op1, op1_copy, result); zendi_convert_to_long(op2, op2_copy, result); @@ -1096,7 +1096,7 @@ ZEND_API int mod_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) ZEND_API int boolean_xor_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) { zval op1_copy, op2_copy; - + Z_TYPE_P(result) = IS_BOOL; zendi_convert_to_boolean(op1, op1_copy, result); @@ -1109,7 +1109,7 @@ ZEND_API int boolean_xor_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) ZEND_API int boolean_not_function(zval *result, zval *op1 TSRMLS_DC) { zval op1_copy; - + zendi_convert_to_boolean(op1, op1_copy, result); Z_TYPE_P(result) = IS_BOOL; @@ -1121,9 +1121,9 @@ ZEND_API int boolean_not_function(zval *result, zval *op1 TSRMLS_DC) ZEND_API int bitwise_not_function(zval *result, zval *op1 TSRMLS_DC) { zval op1_copy = *op1; - + op1 = &op1_copy; - + if (Z_TYPE_P(op1) == IS_DOUBLE) { Z_LVAL_P(op1) = (long) Z_DVAL_P(op1); Z_TYPE_P(op1) = IS_LONG; @@ -1195,7 +1195,7 @@ ZEND_API int bitwise_or_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) ZEND_API int bitwise_and_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) { zval op1_copy, op2_copy; - + if (Z_TYPE_P(op1) == IS_STRING && Z_TYPE_P(op2) == IS_STRING) { zval *longer, *shorter; char *result_str; @@ -1222,7 +1222,7 @@ ZEND_API int bitwise_and_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) Z_STRLEN_P(result) = result_len; return SUCCESS; } - + if (Z_TYPE_P(op1) == IS_UNICODE || Z_TYPE_P(op2) == IS_UNICODE) { zend_error(E_ERROR, "Unsupported operand types"); return FAILURE; @@ -1240,7 +1240,7 @@ ZEND_API int bitwise_and_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) ZEND_API int bitwise_xor_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) { zval op1_copy, op2_copy; - + if (Z_TYPE_P(op1) == IS_STRING && Z_TYPE_P(op2) == IS_STRING) { zval *longer, *shorter; char *result_str; @@ -1274,7 +1274,7 @@ ZEND_API int bitwise_xor_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) } zendi_convert_to_long(op1, op1_copy, result); - zendi_convert_to_long(op2, op2_copy, result); + zendi_convert_to_long(op2, op2_copy, result); Z_TYPE_P(result) = IS_LONG; Z_LVAL_P(result) = Z_LVAL_P(op1) ^ Z_LVAL_P(op2); @@ -1285,7 +1285,7 @@ ZEND_API int bitwise_xor_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) ZEND_API int shift_left_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) { zval op1_copy, op2_copy; - + if (Z_TYPE_P(op1) == IS_UNICODE || Z_TYPE_P(op2) == IS_UNICODE) { zend_error(E_ERROR, "Unsupported operand types"); return FAILURE; @@ -1302,7 +1302,7 @@ ZEND_API int shift_left_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) ZEND_API int shift_right_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) { zval op1_copy, op2_copy; - + if (Z_TYPE_P(op1) == IS_UNICODE || Z_TYPE_P(op2) == IS_UNICODE) { zend_error(E_ERROR, "Unsupported operand types"); return FAILURE; @@ -1526,7 +1526,7 @@ ZEND_API int compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) zval *op1_free, *op2_free; int op1_obj = Z_TYPE_P(op1) == IS_OBJECT; int op2_obj = Z_TYPE_P(op2) == IS_OBJECT; - + if (op1_obj) { if (Z_OBJ_HT_P(op1)->get) { op1 = op1_free = Z_OBJ_HT_P(op1)->get(op1 TSRMLS_CC); @@ -1573,8 +1573,8 @@ ZEND_API int compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) COMPARE_RETURN_AND_FREE(SUCCESS); } } - - if ((Z_TYPE_P(op1) == IS_UNICODE || Z_TYPE_P(op1) == IS_STRING) && + + if ((Z_TYPE_P(op1) == IS_UNICODE || Z_TYPE_P(op1) == IS_STRING) && (Z_TYPE_P(op2) == IS_UNICODE || Z_TYPE_P(op2) == IS_STRING)) { if (Z_TYPE_P(op1) == IS_UNICODE || Z_TYPE_P(op2) == IS_UNICODE) { @@ -1872,7 +1872,7 @@ static void increment_string(zval *str) char *t; int last=0; /* Shut up the compiler warning */ int ch; - + if (Z_STRLEN_P(str) == 0) { STR_FREE(Z_STRVAL_P(str)); Z_STRVAL_P(str) = estrndup("1", sizeof("1")-1); @@ -1951,7 +1951,7 @@ ZEND_API int increment_function(zval *op1) ZVAL_DOUBLE(op1, d+1); } else { Z_LVAL_P(op1)++; - } + } break; case IS_DOUBLE: Z_DVAL_P(op1) = Z_DVAL_P(op1) + 1; @@ -2003,7 +2003,7 @@ ZEND_API int decrement_function(zval *op1) { long lval; double dval; - + switch (Z_TYPE_P(op1)) { case IS_LONG: if (Z_LVAL_P(op1) == LONG_MIN) { @@ -2071,7 +2071,7 @@ ZEND_API char *zend_str_tolower_copy(char *dest, const char *source, unsigned in return dest; } - + ZEND_API char *zend_str_tolower_dup(const char *source, unsigned int length) { return zend_str_tolower_copy((char *)emalloc(length+1), source, length); @@ -2094,7 +2094,7 @@ ZEND_API void *zend_u_str_tolower_copy(zend_uchar type, void *dest, const void * return zend_str_tolower_copy(dest, source, length); } } - + ZEND_API void *zend_u_str_tolower_dup(zend_uchar type, const void *source, unsigned int length) { if (type == IS_UNICODE) { @@ -2154,7 +2154,7 @@ ZEND_API void *zend_u_str_case_fold(zend_uchar type, const void *source, unsigne ZEND_API int zend_binary_strcmp(char *s1, uint len1, char *s2, uint len2) { int retval; - + retval = memcmp(s1, s2, MIN(len1, len2)); if (!retval) { return (len1 - len2); @@ -2174,7 +2174,7 @@ ZEND_API int zend_u_binary_strcmp(UChar *s1, int32_t len1, UChar *s2, int32_t le ZEND_API int zend_binary_strncmp(char *s1, uint len1, char *s2, uint len2, uint length) { int retval; - + retval = memcmp(s1, s2, MIN(length, MIN(len1, len2))); if (!retval) { return (MIN(length, len1) - MIN(length, len2)); @@ -2306,7 +2306,7 @@ ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2) int ret1, ret2; long lval1, lval2; double dval1, dval2; - + if ((ret1=is_numeric_string(Z_STRVAL_P(s1), Z_STRLEN_P(s1), &lval1, &dval1, 0)) && (ret2=is_numeric_string(Z_STRVAL_P(s2), Z_STRLEN_P(s2), &lval2, &dval2, 0))) { if ((ret1==IS_DOUBLE) || (ret2==IS_DOUBLE)) { @@ -2328,7 +2328,7 @@ ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2) Z_LVAL_P(result) = ZEND_NORMALIZE_BOOL(Z_LVAL_P(result)); Z_TYPE_P(result) = IS_LONG; } - return; + return; } @@ -2339,7 +2339,7 @@ ZEND_API void zendi_u_smart_strcmp(zval *result, zval *s1, zval *s2) double dval1, dval2; zval s1_copy, s2_copy; int use_copy1 = 0, use_copy2 = 0; - + if (Z_TYPE_P(s1) != IS_UNICODE || Z_TYPE_P(s2) != IS_UNICODE) { zend_make_unicode_zval(s1, &s1_copy, &use_copy1); zend_make_unicode_zval(s2, &s2_copy, &use_copy2); @@ -2379,7 +2379,7 @@ ZEND_API void zendi_u_smart_strcmp(zval *result, zval *s1, zval *s2) if (use_copy2) { zval_dtor(s2); } - return; + return; } @@ -2448,9 +2448,9 @@ ZEND_API void zend_locale_usprintf_double(zval *op ZEND_FILE_LINE_DC) ZEND_API void zend_locale_sprintf_double(zval *op ZEND_FILE_LINE_DC) { double dval = Z_DVAL_P(op); - + TSRMLS_FETCH(); - + Z_STRVAL_P(op) = (char *) emalloc_rel(MAX_LENGTH_OF_DOUBLE + EG(precision) + 1); sprintf(Z_STRVAL_P(op), "%.*G", (int) EG(precision), dval); Z_STRLEN_P(op) = strlen(Z_STRVAL_P(op)); diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h index 699904092e..75acb8a033 100644 --- a/Zend/zend_operators.h +++ b/Zend/zend_operators.h @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | @@ -78,7 +78,7 @@ static inline zend_uchar is_numeric_string(char *str, int length, long *lval, do if (!length) { return 0; } - + /* handle hex numbers */ if (length>=2 && str[0]=='0' && (str[1]=='x' || str[1]=='X')) { conv_base=16; @@ -147,7 +147,7 @@ static inline zend_uchar is_numeric_unicode(UChar *str, int32_t length, long *lv if (!length) { return 0; } - + /* handle hex numbers */ if (length>=2 && str[0]=='0' && (str[1]=='x' || str[1]=='X')) { conv_base=16; @@ -222,14 +222,14 @@ zend_memnstr(char *haystack, char *needle, int needle_len, char *end) return p; } } - + if (p == NULL) { return NULL; } - + p++; } - + return NULL; } @@ -406,7 +406,7 @@ END_EXTERN_C() #define Z_OBJVAL_P(zval_p) Z_OBJVAL(*zval_p) #define Z_OBJ_HANDLE_P(zval_p) Z_OBJ_HANDLE(*zval_p) #define Z_OBJ_HT_P(zval_p) Z_OBJ_HT(*zval_p) -#define Z_OBJ_HANDLER_P(zval_p, h) Z_OBJ_HANDLER(*zval_p, h) +#define Z_OBJ_HANDLER_P(zval_p, h) Z_OBJ_HANDLER(*zval_p, h) #define Z_UNIVAL_P(zval_p) Z_UNIVAL(*zval_p) #define Z_UNILEN_P(zval_p) Z_UNILEN(*zval_p) @@ -425,7 +425,7 @@ END_EXTERN_C() #define Z_OBJVAL_PP(zval_pp) Z_OBJVAL(**zval_pp) #define Z_OBJ_HANDLE_PP(zval_p) Z_OBJ_HANDLE(**zval_p) #define Z_OBJ_HT_PP(zval_p) Z_OBJ_HT(**zval_p) -#define Z_OBJ_HANDLER_PP(zval_p, h) Z_OBJ_HANDLER(**zval_p, h) +#define Z_OBJ_HANDLER_PP(zval_p, h) Z_OBJ_HANDLER(**zval_p, h) #define Z_UNIVAL_PP(zval_pp) Z_UNIVAL(**zval_pp) #define Z_UNILEN_PP(zval_pp) Z_UNILEN(**zval_pp) diff --git a/Zend/zend_ptr_stack.c b/Zend/zend_ptr_stack.c index 420a6eb211..35d032cdfb 100644 --- a/Zend/zend_ptr_stack.c +++ b/Zend/zend_ptr_stack.c @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | @@ -37,7 +37,7 @@ ZEND_API void zend_ptr_stack_n_push(zend_ptr_stack *stack, int count, ...) { va_list ptr; void *elem; - + ZEND_PTR_STACK_RESIZE_IF_NEEDED(stack, count) va_start(ptr, count); @@ -55,7 +55,7 @@ ZEND_API void zend_ptr_stack_n_pop(zend_ptr_stack *stack, int count, ...) { va_list ptr; void **elem; - + va_start(ptr, count); while (count>0) { elem = va_arg(ptr, void **); diff --git a/Zend/zend_ptr_stack.h b/Zend/zend_ptr_stack.h index 8a0d739a6f..def11937ae 100644 --- a/Zend/zend_ptr_stack.h +++ b/Zend/zend_ptr_stack.h @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | diff --git a/Zend/zend_qsort.c b/Zend/zend_qsort.c index 23e4468fb0..a732306272 100644 --- a/Zend/zend_qsort.c +++ b/Zend/zend_qsort.c @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | @@ -85,10 +85,10 @@ ZEND_API void zend_qsort(void *base, size_t nmemb, size_t siz, compare_func_t co for (; seg2 >= seg1 && compare(seg2, begin TSRMLS_CC) > 0; seg2 -= siz); - + if (seg1 >= seg2) break; - + _zend_qsort_swap(seg1, seg2, siz); seg1 += siz; @@ -98,7 +98,7 @@ ZEND_API void zend_qsort(void *base, size_t nmemb, size_t siz, compare_func_t co _zend_qsort_swap(begin, seg2, siz); seg2p = seg2; - + if ((seg2p - begin) <= (end - seg2p)) { if ((seg2p + siz) < end) { begin_stack[loop] = seg2p + siz; @@ -117,9 +117,9 @@ ZEND_API void zend_qsort(void *base, size_t nmemb, size_t siz, compare_func_t co } } -/* +/* * Local Variables: - * c-basic-offset: 4 + * c-basic-offset: 4 * tab-width: 4 * End: * vim600: fdm=marker diff --git a/Zend/zend_qsort.h b/Zend/zend_qsort.h index ae71520567..8f4413e546 100644 --- a/Zend/zend_qsort.h +++ b/Zend/zend_qsort.h @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | diff --git a/Zend/zend_sprintf.c b/Zend/zend_sprintf.c index 746c01fbb4..2a5f8da502 100644 --- a/Zend/zend_sprintf.c +++ b/Zend/zend_sprintf.c @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | diff --git a/Zend/zend_stack.c b/Zend/zend_stack.c index 0badedc48f..a6dadd58ce 100644 --- a/Zend/zend_stack.c +++ b/Zend/zend_stack.c @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | diff --git a/Zend/zend_stack.h b/Zend/zend_stack.h index 766796b7be..58a9e8c317 100644 --- a/Zend/zend_stack.h +++ b/Zend/zend_stack.h @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | diff --git a/Zend/zend_stream.c b/Zend/zend_stream.c index d8467bd8cd..ce244bda68 100644 --- a/Zend/zend_stream.c +++ b/Zend/zend_stream.c @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | @@ -51,7 +51,7 @@ ZEND_API int zend_stream_open(const char *filename, zend_file_handle *handle TSR handle->handle.fp = zend_fopen(filename, &handle->opened_path); handle->filename = (char *)filename; handle->free_filename = 0; - + return (handle->handle.fp) ? SUCCESS : FAILURE; } @@ -63,20 +63,20 @@ ZEND_API int zend_stream_fixup(zend_file_handle *file_handle TSRMLS_DC) return FAILURE; } break; - + case ZEND_HANDLE_FD: file_handle->handle.fp = fdopen(file_handle->handle.fd, "rb"); file_handle->type = ZEND_HANDLE_FP; break; - + case ZEND_HANDLE_FP: file_handle->handle.fp = file_handle->handle.fp; break; - + case ZEND_HANDLE_STREAM: /* nothing to do */ return SUCCESS; - + default: return FAILURE; } @@ -100,7 +100,7 @@ ZEND_API size_t zend_stream_read(zend_file_handle *file_handle, char *buf, size_ { if (file_handle->handle.stream.interactive) { int c = '*'; - size_t n; + size_t n; #ifdef NETWARE /* @@ -110,11 +110,11 @@ ZEND_API size_t zend_stream_read(zend_file_handle *file_handle, char *buf, size_ */ for ( n = 0; n < len && (c = zend_stream_getc( file_handle TSRMLS_CC)) != EOF && c != 4 && c != '\n'; ++n ) #else - for ( n = 0; n < len && (c = zend_stream_getc( file_handle TSRMLS_CC)) != EOF && c != '\n'; ++n ) + for ( n = 0; n < len && (c = zend_stream_getc( file_handle TSRMLS_CC)) != EOF && c != '\n'; ++n ) #endif - buf[n] = (char) c; + buf[n] = (char) c; if ( c == '\n' ) - buf[n++] = (char) c; + buf[n++] = (char) c; return n; } diff --git a/Zend/zend_stream.h b/Zend/zend_stream.h index 81df585abe..6c05ceed87 100644 --- a/Zend/zend_stream.h +++ b/Zend/zend_stream.h @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | @@ -61,4 +61,3 @@ END_EXTERN_C() #define zend_stream_close(handle) zend_file_handle_dtor((handle)) #endif - diff --git a/Zend/zend_strtod.c b/Zend/zend_strtod.c index 9fb71a13ab..bdc5daab53 100644 --- a/Zend/zend_strtod.c +++ b/Zend/zend_strtod.c @@ -1778,7 +1778,7 @@ zend_strtod if (se) *se = (char *)s; result = sign ? -value(rv) : value(rv); - + for (i = 0; i <= Kmax; i++) { Bigint **listp = &freelist[i]; while ((tmp = *listp) != NULL) { @@ -1787,13 +1787,13 @@ zend_strtod } freelist[i] = NULL; } - + while (p5s) { tmp = p5s; p5s = p5s->next; free(tmp); } - + return result; } diff --git a/Zend/zend_strtod.h b/Zend/zend_strtod.h index c5c94a57e8..f740ccf1b7 100644 --- a/Zend/zend_strtod.h +++ b/Zend/zend_strtod.h @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | diff --git a/Zend/zend_ts_hash.c b/Zend/zend_ts_hash.c index 192ca145fe..6772ea05aa 100644 --- a/Zend/zend_ts_hash.c +++ b/Zend/zend_ts_hash.c @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | diff --git a/Zend/zend_ts_hash.h b/Zend/zend_ts_hash.h index da3be8f175..9147d81135 100644 --- a/Zend/zend_ts_hash.h +++ b/Zend/zend_ts_hash.h @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | diff --git a/Zend/zend_unicode.c b/Zend/zend_unicode.c index 6cff671964..6ba617d64a 100644 --- a/Zend/zend_unicode.c +++ b/Zend/zend_unicode.c @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | @@ -43,14 +43,14 @@ static void zend_from_unicode_substitute_cb( { return; } - + *err = U_ZERO_ERROR; //ucnv_cbFromUWriteSub(fromArgs, 0, err); return; } else if (*((char*)context)=='i') { if (reason != UCNV_UNASSIGNED) { - /* the caller must have set + /* the caller must have set * the error code accordingly */ return; @@ -143,7 +143,7 @@ int zend_set_converter_encoding(UConverter **converter, const char *encoding) } /* - * If encoding is NULL, ucnv_open() will return a converter based on + * If encoding is NULL, ucnv_open() will return a converter based on * the default platform encoding as determined by ucnv_getDefaultName(). */ new_converter = ucnv_open(encoding, &status); @@ -309,7 +309,7 @@ ZEND_API void zend_convert_encodings(UConverter *target_conv, UConverter *source if (U_FAILURE(*status)) { return; } - + null_size = ucnv_getMinCharSize(target_conv); allocated = source_len + null_size; @@ -493,7 +493,7 @@ ZEND_API int zend_is_valid_identifier(UChar *ident, int32_t ident_len) for (i = 0; i < ident_len; ) { U16_NEXT(ident, i, ident_len, codepoint); - if (!u_hasBinaryProperty(codepoint, id_prop) && + if (!u_hasBinaryProperty(codepoint, id_prop) && codepoint != 0x5f) { /* special case for starting '_' */ return 0; } diff --git a/Zend/zend_unicode.h b/Zend/zend_unicode.h index abd7eaf924..7154c377c9 100644 --- a/Zend/zend_unicode.h +++ b/Zend/zend_unicode.h @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | diff --git a/Zend/zend_variables.c b/Zend/zend_variables.c index d0622ff589..1f1936950f 100644 --- a/Zend/zend_variables.c +++ b/Zend/zend_variables.c @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | @@ -171,7 +171,7 @@ copy_unicode: } } -ZEND_API int zend_print_variable(zval *var) +ZEND_API int zend_print_variable(zval *var) { return zend_print_zval(var, 0); } diff --git a/Zend/zend_variables.h b/Zend/zend_variables.h index 2cb30231c1..bcfb957900 100644 --- a/Zend/zend_variables.h +++ b/Zend/zend_variables.h @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index d4dddb36d1..352865e99d 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -1106,7 +1106,7 @@ ZEND_VM_HANDLER(93, ZEND_FETCH_DIM_FUNC_ARG, VAR|CV, CONST|TMP|VAR|UNUSED|CV) zend_free_op free_op1, free_op2; int type = ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)?BP_VAR_W:BP_VAR_R; zval *dim; - + if (OP2_TYPE == IS_UNUSED && type == BP_VAR_R) { zend_error_noreturn(E_ERROR, "Cannot use [] for reading"); } @@ -1414,7 +1414,7 @@ ZEND_VM_HANDLER(39, ZEND_ASSIGN_REF, VAR|CV, VAR|CV) if (OP2_TYPE == IS_VAR && value_ptr_ptr && !(*value_ptr_ptr)->is_ref && - opline->extended_value == ZEND_RETURNS_FUNCTION && + opline->extended_value == ZEND_RETURNS_FUNCTION && !EX_T(opline->op2.u.var).var.fcall_returned_reference) { if (free_op2.var == NULL) { PZVAL_LOCK(*value_ptr_ptr); /* undo the effect of get_zval_ptr_ptr() */ @@ -1820,7 +1820,7 @@ ZEND_VM_HELPER(zend_do_fcall_common_helper, ANY, ANY) ZEND_VM_NEXT_OPCODE(); /* Never reached */ } if (EX(function_state).function->common.fn_flags & ZEND_ACC_DEPRECATED) { - zend_error(E_NOTICE, "Function %s%s%s() is deprecated", + zend_error(E_NOTICE, "Function %s%s%s() is deprecated", EX(function_state).function->common.scope ? EX(function_state).function->common.scope->name : "", EX(function_state).function->common.scope ? "::" : "", EX(function_state).function->common.function_name); @@ -2230,8 +2230,8 @@ ZEND_VM_HANDLER(106, ZEND_SEND_VAR_NO_REF, VAR|CV, ANY) varptr = GET_OP1_ZVAL_PTR(BP_VAR_R); if ((!(opline->extended_value & ZEND_ARG_SEND_FUNCTION) || EX_T(opline->op1.u.var).var.fcall_returned_reference) && - varptr != &EG(uninitialized_zval) && - (PZVAL_IS_REF(varptr) || + varptr != &EG(uninitialized_zval) && + (PZVAL_IS_REF(varptr) || (varptr->refcount == 1 && (OP1_TYPE == IS_CV || free_op1.var)))) { varptr->is_ref = 1; varptr->refcount++; @@ -2467,7 +2467,7 @@ ZEND_VM_HANDLER(68, ZEND_NEW, ANY, ANY) SELECTIVE_PZVAL_LOCK(object_zval, &opline->result); EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr; EX_T(opline->result.u.var).var.ptr = object_zval; - + zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), opline); /* We are not handling overloaded classes right now */ @@ -2861,9 +2861,9 @@ ZEND_VM_HANDLER(74, ZEND_UNSET_VAR, CONST|TMP|VAR|CV, ANY) if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) { zend_std_unset_static_property(EX_T(opline->op2.u.var).class_entry, Z_TYPE_P(varname), Z_UNIVAL_P(varname), Z_UNILEN_P(varname) TSRMLS_CC); } else { - target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), BP_VAR_IS, varname TSRMLS_CC); + target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), BP_VAR_IS, varname TSRMLS_CC); if (zend_u_hash_del(target_symbol_table, Z_TYPE_P(varname), Z_UNIVAL_P(varname), Z_UNILEN_P(varname)+1) == SUCCESS) { - zend_execute_data *ex = EXECUTE_DATA; + zend_execute_data *ex = EXECUTE_DATA; ulong hash_value = zend_u_inline_hash_func(Z_TYPE_P(varname), Z_UNIVAL_P(varname), Z_UNILEN_P(varname)+1); do { @@ -2940,7 +2940,7 @@ ZEND_VM_HANDLER(75, ZEND_UNSET_DIM, VAR|UNUSED|CV, CONST|TMP|VAR|CV) free_offset = 1; } } - + if (zend_u_symtable_del(ht, Z_TYPE_P(offset), offset_key, offset_len+1) == SUCCESS && ht == &EG(symbol_table)) { zend_execute_data *ex; @@ -3057,7 +3057,7 @@ ZEND_VM_HANDLER(77, ZEND_FE_RESET, CONST|TMP|VAR|CV, ANY) zend_error(E_WARNING, "foreach() can not iterate over objects without PHP class"); ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num); } - + ce = Z_OBJCE_PP(array_ptr_ptr); if (!ce || ce->get_iterator == NULL) { SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr); @@ -3550,13 +3550,13 @@ ZEND_VM_HANDLER(79, ZEND_EXIT, CONST|TMP|VAR|UNUSED|CV, ANY) ZEND_VM_HANDLER(57, ZEND_BEGIN_SILENCE, ANY, ANY) { zend_op *opline = EX(opline); - + Z_LVAL(EX_T(opline->result.u.var).tmp_var) = EG(error_reporting); Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_LONG; /* shouldn't be necessary */ if (EX(old_error_reporting) == NULL) { EX(old_error_reporting) = &EX_T(opline->result.u.var).tmp_var; } - + if (EG(error_reporting)) { zend_alter_ini_entry("error_reporting", sizeof("error_reporting"), "0", 1, ZEND_INI_USER, ZEND_INI_STAGE_RUNTIME); } @@ -3752,7 +3752,7 @@ ZEND_VM_HANDLER(149, ZEND_HANDLE_EXCEPTION, ANY, ANY) zendi_zval_dtor(restored_error_reporting); } EX(old_error_reporting) = NULL; - + if (encapsulating_block == -1) { ZEND_VM_RETURN_FROM_EXECUTE_LOOP(); } else { @@ -3768,7 +3768,7 @@ ZEND_VM_HANDLER(146, ZEND_VERIFY_ABSTRACT_CLASS, ANY, ANY) } ZEND_VM_HANDLER(150, ZEND_USER_OPCODE, ANY, ANY) -{ +{ int ret = zend_user_opcode_handlers[EX(opline)->opcode](ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_INTERNAL); switch (ret) { diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 531d38a61e..4678488041 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -81,7 +81,7 @@ ZEND_API void execute(zend_op_array *op_array TSRMLS_DC) */ EX(function_state).function_symbol_table = NULL; #endif - + while (1) { #ifdef ZEND_WIN32 if (EG(timed_out)) { @@ -146,7 +146,7 @@ static int zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS) ZEND_VM_NEXT_OPCODE(); /* Never reached */ } if (EX(function_state).function->common.fn_flags & ZEND_ACC_DEPRECATED) { - zend_error(E_NOTICE, "Function %s%s%s() is deprecated", + zend_error(E_NOTICE, "Function %s%s%s() is deprecated", EX(function_state).function->common.scope ? EX(function_state).function->common.scope->name : "", EX(function_state).function->common.scope ? "::" : "", EX(function_state).function->common.function_name); @@ -429,7 +429,7 @@ static int ZEND_NEW_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS) SELECTIVE_PZVAL_LOCK(object_zval, &opline->result); EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr; EX_T(opline->result.u.var).var.ptr = object_zval; - + zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), opline); /* We are not handling overloaded classes right now */ @@ -443,13 +443,13 @@ static int ZEND_NEW_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_BEGIN_SILENCE_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + Z_LVAL(EX_T(opline->result.u.var).tmp_var) = EG(error_reporting); Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_LONG; /* shouldn't be necessary */ if (EX(old_error_reporting) == NULL) { EX(old_error_reporting) = &EX_T(opline->result.u.var).tmp_var; } - + if (EG(error_reporting)) { zend_alter_ini_entry("error_reporting", sizeof("error_reporting"), "0", 1, ZEND_INI_USER, ZEND_INI_STAGE_RUNTIME); } @@ -583,7 +583,7 @@ static int ZEND_HANDLE_EXCEPTION_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zendi_zval_dtor(restored_error_reporting); } EX(old_error_reporting) = NULL; - + if (encapsulating_block == -1) { ZEND_VM_RETURN_FROM_EXECUTE_LOOP(); } else { @@ -599,7 +599,7 @@ static int ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } static int ZEND_USER_OPCODE_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS) -{ +{ int ret = zend_user_opcode_handlers[EX(opline)->opcode](ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_INTERNAL); switch (ret) { @@ -618,7 +618,7 @@ static int ZEND_FETCH_CLASS_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *class_name; - + if (IS_CONST == IS_UNUSED) { @@ -657,7 +657,7 @@ static int ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_A char *function_name_strval; unsigned int function_name_strlen; zend_bool is_const = (IS_CONST == IS_CONST); - + if (is_const) { function_name_strval = Z_UNIVAL(opline->op2.u.constant); @@ -702,7 +702,7 @@ static int ZEND_INIT_FCALL_BY_NAME_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_function *function; void *function_name_strval, *lcname; unsigned int function_name_strlen, lcname_len; - + zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), NULL); @@ -1052,7 +1052,7 @@ static int ZEND_FETCH_CLASS_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *class_name; - + if (IS_UNUSED == IS_UNUSED) { @@ -1091,7 +1091,7 @@ static int ZEND_INIT_STATIC_METHOD_CALL_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ char *function_name_strval; unsigned int function_name_strlen; zend_bool is_const = (IS_UNUSED == IS_CONST); - + if (is_const) { function_name_strval = Z_UNIVAL(opline->op2.u.constant); @@ -1133,7 +1133,7 @@ static int ZEND_FETCH_CLASS_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *class_name; - + if (IS_CV == IS_UNUSED) { @@ -1172,7 +1172,7 @@ static int ZEND_INIT_STATIC_METHOD_CALL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS char *function_name_strval; unsigned int function_name_strlen; zend_bool is_const = (IS_CV == IS_CONST); - + if (is_const) { function_name_strval = Z_UNIVAL(opline->op2.u.constant); @@ -1217,7 +1217,7 @@ static int ZEND_INIT_FCALL_BY_NAME_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_function *function; void *function_name_strval, *lcname; unsigned int function_name_strlen, lcname_len; - + zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), NULL); @@ -1255,7 +1255,7 @@ static int ZEND_INIT_FCALL_BY_NAME_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_BW_NOT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + bitwise_not_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant TSRMLS_CC); @@ -1266,7 +1266,7 @@ static int ZEND_BW_NOT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_BOOL_NOT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + boolean_not_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant TSRMLS_CC); @@ -1277,7 +1277,7 @@ static int ZEND_BOOL_NOT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_ECHO_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *z = &opline->op1.u.constant; UErrorCode status = U_ZERO_ERROR; @@ -1444,7 +1444,7 @@ static int ZEND_FETCH_IS_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_JMPZ_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + int ret = i_zend_is_true(&opline->op1.u.constant); if (!ret) { @@ -1460,7 +1460,7 @@ static int ZEND_JMPZ_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_JMPNZ_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + int ret = i_zend_is_true(&opline->op1.u.constant); if (ret) { @@ -1476,7 +1476,7 @@ static int ZEND_JMPNZ_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_JMPZNZ_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + int retval = i_zend_is_true(&opline->op1.u.constant); if (retval) { @@ -1495,7 +1495,7 @@ static int ZEND_JMPZNZ_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_JMPZ_EX_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + int retval = i_zend_is_true(&opline->op1.u.constant); Z_LVAL(EX_T(opline->result.u.var).tmp_var) = retval; @@ -1512,7 +1512,7 @@ static int ZEND_JMPZ_EX_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_JMPNZ_EX_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + int retval = i_zend_is_true(&opline->op1.u.constant); Z_LVAL(EX_T(opline->result.u.var).tmp_var) = retval; @@ -1529,7 +1529,7 @@ static int ZEND_JMPNZ_EX_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_DO_FCALL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *fname = &opline->op1.u.constant; zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), NULL); @@ -1548,7 +1548,7 @@ static int ZEND_RETURN_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_op *opline = EX(opline); zval *retval_ptr; zval **retval_ptr_ptr; - + if (EG(active_op_array)->return_reference == ZEND_RETURN_REF) { @@ -1633,7 +1633,7 @@ static int ZEND_THROW_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_op *opline = EX(opline); zval *value; zval *exception; - + value = &opline->op1.u.constant; @@ -1662,7 +1662,7 @@ static int ZEND_SEND_VAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zval *valptr; zval *value; - + value = &opline->op1.u.constant; @@ -1680,7 +1680,7 @@ static int ZEND_SEND_VAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_BOOL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + /* PHP 3.0 returned "" for false and 1 for true, here we use 0 and 1 for now */ Z_LVAL(EX_T(opline->result.u.var).tmp_var) = i_zend_is_true(&opline->op1.u.constant); @@ -1692,7 +1692,7 @@ static int ZEND_BOOL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_CLONE_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *obj = &opline->op1.u.constant; zend_class_entry *ce; zend_function *clone; @@ -1748,7 +1748,7 @@ static int ZEND_CLONE_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_CAST_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *expr = &opline->op1.u.constant; zval *result = &EX_T(opline->result.u.var).tmp_var; @@ -1808,7 +1808,7 @@ static int ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_op_array *new_op_array=NULL; zval **original_return_value = EG(return_value_ptr_ptr); int return_value_used; - + zval *inc_filename = &opline->op1.u.constant; zval tmp_inc_filename; zend_bool failure_retval=0; @@ -1933,7 +1933,7 @@ static int ZEND_UNSET_VAR_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_op *opline = EX(opline); zval tmp, *varname; HashTable *target_symbol_table; - + varname = &opline->op1.u.constant; @@ -1947,9 +1947,9 @@ static int ZEND_UNSET_VAR_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) { zend_std_unset_static_property(EX_T(opline->op2.u.var).class_entry, Z_TYPE_P(varname), Z_UNIVAL_P(varname), Z_UNILEN_P(varname) TSRMLS_CC); } else { - target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), BP_VAR_IS, varname TSRMLS_CC); + target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), BP_VAR_IS, varname TSRMLS_CC); if (zend_u_hash_del(target_symbol_table, Z_TYPE_P(varname), Z_UNIVAL_P(varname), Z_UNILEN_P(varname)+1) == SUCCESS) { - zend_execute_data *ex = execute_data; + zend_execute_data *ex = execute_data; ulong hash_value = zend_u_inline_hash_func(Z_TYPE_P(varname), Z_UNIVAL_P(varname), Z_UNILEN_P(varname)+1); do { @@ -1980,7 +1980,7 @@ static int ZEND_UNSET_VAR_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_FE_RESET_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *array_ptr, **array_ptr_ptr; HashTable *fe_ht; zend_object_iterator *iter = NULL; @@ -1996,7 +1996,7 @@ static int ZEND_FE_RESET_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_error(E_WARNING, "foreach() can not iterate over objects without PHP class"); ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num); } - + ce = Z_OBJCE_PP(array_ptr_ptr); if (!ce || ce->get_iterator == NULL) { SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr); @@ -2104,7 +2104,7 @@ static int ZEND_FE_RESET_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval tmp, *varname = &opline->op1.u.constant; zval **value; zend_bool isset = 1; @@ -2159,7 +2159,7 @@ static int ZEND_EXIT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { if (IS_CONST != IS_UNUSED) { zend_op *opline = EX(opline); - + zval *ptr = &opline->op1.u.constant; if (Z_TYPE_P(ptr) == IS_LONG) { @@ -2176,7 +2176,7 @@ static int ZEND_EXIT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_QM_ASSIGN_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *value = &opline->op1.u.constant; EX_T(opline->result.u.var).tmp_var = *value; @@ -2203,7 +2203,7 @@ static int ZEND_TICKS_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_U_NORMALIZE_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *string = &opline->op1.u.constant; zval *result = &EX_T(opline->result.u.var).tmp_var; @@ -2238,7 +2238,7 @@ static int ZEND_U_NORMALIZE_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_ADD_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + add_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, @@ -2251,7 +2251,7 @@ static int ZEND_ADD_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_SUB_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + sub_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, @@ -2264,7 +2264,7 @@ static int ZEND_SUB_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_MUL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + mul_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, @@ -2277,7 +2277,7 @@ static int ZEND_MUL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_DIV_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + div_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, @@ -2290,7 +2290,7 @@ static int ZEND_DIV_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_MOD_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + mod_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, @@ -2303,7 +2303,7 @@ static int ZEND_MOD_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_SL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + shift_left_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, @@ -2316,7 +2316,7 @@ static int ZEND_SL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_SR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + shift_right_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, @@ -2329,7 +2329,7 @@ static int ZEND_SR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_CONCAT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + concat_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, @@ -2342,7 +2342,7 @@ static int ZEND_CONCAT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_IS_IDENTICAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + is_identical_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, @@ -2355,7 +2355,7 @@ static int ZEND_IS_IDENTICAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_IS_NOT_IDENTICAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + is_not_identical_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, @@ -2368,7 +2368,7 @@ static int ZEND_IS_NOT_IDENTICAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_AR static int ZEND_IS_EQUAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + is_equal_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, @@ -2381,7 +2381,7 @@ static int ZEND_IS_EQUAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_IS_NOT_EQUAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + is_not_equal_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, @@ -2394,7 +2394,7 @@ static int ZEND_IS_NOT_EQUAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_IS_SMALLER_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + is_smaller_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, @@ -2407,7 +2407,7 @@ static int ZEND_IS_SMALLER_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + is_smaller_or_equal_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, @@ -2420,7 +2420,7 @@ static int ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER static int ZEND_BW_OR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + bitwise_or_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, @@ -2433,7 +2433,7 @@ static int ZEND_BW_OR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_BW_AND_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + bitwise_and_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, @@ -2446,7 +2446,7 @@ static int ZEND_BW_AND_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_BW_XOR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, @@ -2459,7 +2459,7 @@ static int ZEND_BW_XOR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_BOOL_XOR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + boolean_xor_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, @@ -2473,7 +2473,7 @@ static int ZEND_CASE_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); int switch_expr_is_overloaded=0; - + if (IS_CONST==IS_VAR) { if (EX_T(opline->op1.u.var).var.ptr_ptr) { @@ -2546,7 +2546,7 @@ static int ZEND_FETCH_CONSTANT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS static int ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *array_ptr = &EX_T(opline->result.u.var).tmp_var; zval *expr_ptr, **expr_ptr_ptr = NULL; zval *offset=&opline->op2.u.constant; @@ -3324,7 +3324,7 @@ static int ZEND_INIT_ARRAY_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *array_ptr = &EX_T(opline->result.u.var).tmp_var; zval *expr_ptr, **expr_ptr_ptr = NULL; zval *offset=NULL; @@ -3406,7 +3406,7 @@ static int ZEND_INIT_ARRAY_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_ADD_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + add_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, @@ -3419,7 +3419,7 @@ static int ZEND_ADD_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_SUB_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + sub_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, @@ -3432,7 +3432,7 @@ static int ZEND_SUB_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_MUL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + mul_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, @@ -3445,7 +3445,7 @@ static int ZEND_MUL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_DIV_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + div_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, @@ -3458,7 +3458,7 @@ static int ZEND_DIV_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_MOD_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + mod_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, @@ -3471,7 +3471,7 @@ static int ZEND_MOD_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_SL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + shift_left_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, @@ -3484,7 +3484,7 @@ static int ZEND_SL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_SR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + shift_right_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, @@ -3497,7 +3497,7 @@ static int ZEND_SR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_CONCAT_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + concat_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, @@ -3510,7 +3510,7 @@ static int ZEND_CONCAT_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_IS_IDENTICAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + is_identical_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, @@ -3523,7 +3523,7 @@ static int ZEND_IS_IDENTICAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_IS_NOT_IDENTICAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + is_not_identical_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, @@ -3536,7 +3536,7 @@ static int ZEND_IS_NOT_IDENTICAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_IS_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + is_equal_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, @@ -3549,7 +3549,7 @@ static int ZEND_IS_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_IS_NOT_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + is_not_equal_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, @@ -3562,7 +3562,7 @@ static int ZEND_IS_NOT_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_IS_SMALLER_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + is_smaller_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, @@ -3575,7 +3575,7 @@ static int ZEND_IS_SMALLER_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + is_smaller_or_equal_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, @@ -3588,7 +3588,7 @@ static int ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_AR static int ZEND_BW_OR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + bitwise_or_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, @@ -3601,7 +3601,7 @@ static int ZEND_BW_OR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_BW_AND_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + bitwise_and_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, @@ -3614,7 +3614,7 @@ static int ZEND_BW_AND_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_BW_XOR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, @@ -3627,7 +3627,7 @@ static int ZEND_BW_XOR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_BOOL_XOR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + boolean_xor_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, @@ -3641,7 +3641,7 @@ static int ZEND_CASE_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); int switch_expr_is_overloaded=0; - + if (IS_CONST==IS_VAR) { if (EX_T(opline->op1.u.var).var.ptr_ptr) { @@ -3671,7 +3671,7 @@ static int ZEND_CASE_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *array_ptr = &EX_T(opline->result.u.var).tmp_var; zval *expr_ptr, **expr_ptr_ptr = NULL; zval *offset=_get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); @@ -4447,9 +4447,9 @@ static int ZEND_UNSET_VAR_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) { zend_std_unset_static_property(EX_T(opline->op2.u.var).class_entry, Z_TYPE_P(varname), Z_UNIVAL_P(varname), Z_UNILEN_P(varname) TSRMLS_CC); } else { - target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), BP_VAR_IS, varname TSRMLS_CC); + target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), BP_VAR_IS, varname TSRMLS_CC); if (zend_u_hash_del(target_symbol_table, Z_TYPE_P(varname), Z_UNIVAL_P(varname), Z_UNILEN_P(varname)+1) == SUCCESS) { - zend_execute_data *ex = execute_data; + zend_execute_data *ex = execute_data; ulong hash_value = zend_u_inline_hash_func(Z_TYPE_P(varname), Z_UNIVAL_P(varname), Z_UNILEN_P(varname)+1); do { @@ -4496,7 +4496,7 @@ static int ZEND_FE_RESET_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_error(E_WARNING, "foreach() can not iterate over objects without PHP class"); ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num); } - + ce = Z_OBJCE_PP(array_ptr_ptr); if (!ce || ce->get_iterator == NULL) { SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr); @@ -5004,7 +5004,7 @@ static int ZEND_FETCH_DIM_TMP_VAR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARG PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr); } } else { - + zval *dim = &opline->op2.u.constant; EX_T(opline->result.u.var).var.ptr_ptr = zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), dim, BP_VAR_R TSRMLS_CC); @@ -7214,8 +7214,8 @@ static int ZEND_SEND_VAR_NO_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) varptr = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if ((!(opline->extended_value & ZEND_ARG_SEND_FUNCTION) || EX_T(opline->op1.u.var).var.fcall_returned_reference) && - varptr != &EG(uninitialized_zval) && - (PZVAL_IS_REF(varptr) || + varptr != &EG(uninitialized_zval) && + (PZVAL_IS_REF(varptr) || (varptr->refcount == 1 && (IS_VAR == IS_CV || free_op1.var)))) { varptr->is_ref = 1; varptr->refcount++; @@ -7544,9 +7544,9 @@ static int ZEND_UNSET_VAR_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) { zend_std_unset_static_property(EX_T(opline->op2.u.var).class_entry, Z_TYPE_P(varname), Z_UNIVAL_P(varname), Z_UNILEN_P(varname) TSRMLS_CC); } else { - target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), BP_VAR_IS, varname TSRMLS_CC); + target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), BP_VAR_IS, varname TSRMLS_CC); if (zend_u_hash_del(target_symbol_table, Z_TYPE_P(varname), Z_UNIVAL_P(varname), Z_UNILEN_P(varname)+1) == SUCCESS) { - zend_execute_data *ex = execute_data; + zend_execute_data *ex = execute_data; ulong hash_value = zend_u_inline_hash_func(Z_TYPE_P(varname), Z_UNIVAL_P(varname), Z_UNILEN_P(varname)+1); do { @@ -7593,7 +7593,7 @@ static int ZEND_FE_RESET_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_error(E_WARNING, "foreach() can not iterate over objects without PHP class"); ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num); } - + ce = Z_OBJCE_PP(array_ptr_ptr); if (!ce || ce->get_iterator == NULL) { SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr); @@ -8712,7 +8712,7 @@ static int ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_AR zend_free_op free_op1; int type = ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)?BP_VAR_W:BP_VAR_R; zval *dim; - + if (IS_CONST == IS_UNUSED && type == BP_VAR_R) { zend_error_noreturn(E_ERROR, "Cannot use [] for reading"); } @@ -8787,7 +8787,7 @@ static int zend_fetch_property_address_read_helper_SPEC_VAR_CONST(int type, ZEND SELECTIVE_PZVAL_LOCK(*retval, &opline->result); AI_USE_PTR(EX_T(opline->result.u.var).var); } else { - + zval *offset = &opline->op2.u.constant; if (0) { @@ -8976,7 +8976,7 @@ static int ZEND_ASSIGN_DIM_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_ASSIGN_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *value = &opline->op2.u.constant; zend_assign_to_variable(&opline->result, &opline->op1, &opline->op2, value, (0?IS_TMP_VAR:IS_CONST), EX(Ts) TSRMLS_CC); @@ -9203,7 +9203,7 @@ static int ZEND_UNSET_DIM_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) free_offset = 1; } } - + if (zend_u_symtable_del(ht, Z_TYPE_P(offset), offset_key, offset_len+1) == SUCCESS && ht == &EG(symbol_table)) { zend_execute_data *ex; @@ -9311,7 +9311,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_VAR_CONST(int prop_dim, long index; if (container) { - + zval *offset = &opline->op2.u.constant; if (Z_TYPE_PP(container) == IS_ARRAY) { @@ -10193,7 +10193,7 @@ static int ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS zend_free_op free_op1, free_op2; int type = ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)?BP_VAR_W:BP_VAR_R; zval *dim; - + if (IS_TMP_VAR == IS_UNUSED && type == BP_VAR_R) { zend_error_noreturn(E_ERROR, "Cannot use [] for reading"); } @@ -10687,7 +10687,7 @@ static int ZEND_UNSET_DIM_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) free_offset = 1; } } - + if (zend_u_symtable_del(ht, Z_TYPE_P(offset), offset_key, offset_len+1) == SUCCESS && ht == &EG(symbol_table)) { zend_execute_data *ex; @@ -11677,7 +11677,7 @@ static int ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS zend_free_op free_op1, free_op2; int type = ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)?BP_VAR_W:BP_VAR_R; zval *dim; - + if (IS_VAR == IS_UNUSED && type == BP_VAR_R) { zend_error_noreturn(E_ERROR, "Cannot use [] for reading"); } @@ -11962,7 +11962,7 @@ static int ZEND_ASSIGN_REF_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) if (IS_VAR == IS_VAR && value_ptr_ptr && !(*value_ptr_ptr)->is_ref && - opline->extended_value == ZEND_RETURNS_FUNCTION && + opline->extended_value == ZEND_RETURNS_FUNCTION && !EX_T(opline->op2.u.var).var.fcall_returned_reference) { if (free_op2.var == NULL) { PZVAL_LOCK(*value_ptr_ptr); /* undo the effect of get_zval_ptr_ptr() */ @@ -12209,7 +12209,7 @@ static int ZEND_UNSET_DIM_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) free_offset = 1; } } - + if (zend_u_symtable_del(ht, Z_TYPE_P(offset), offset_key, offset_len+1) == SUCCESS && ht == &EG(symbol_table)) { zend_execute_data *ex; @@ -12754,7 +12754,7 @@ static int ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_A zend_free_op free_op1; int type = ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)?BP_VAR_W:BP_VAR_R; zval *dim; - + if (IS_UNUSED == IS_UNUSED && type == BP_VAR_R) { zend_error_noreturn(E_ERROR, "Cannot use [] for reading"); } @@ -13607,7 +13607,7 @@ static int ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_free_op free_op1; int type = ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)?BP_VAR_W:BP_VAR_R; zval *dim; - + if (IS_CV == IS_UNUSED && type == BP_VAR_R) { zend_error_noreturn(E_ERROR, "Cannot use [] for reading"); } @@ -13682,7 +13682,7 @@ static int zend_fetch_property_address_read_helper_SPEC_VAR_CV(int type, ZEND_OP SELECTIVE_PZVAL_LOCK(*retval, &opline->result); AI_USE_PTR(EX_T(opline->result.u.var).var); } else { - + zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); if (0) { @@ -13871,7 +13871,7 @@ static int ZEND_ASSIGN_DIM_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_ASSIGN_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *value = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); zend_assign_to_variable(&opline->result, &opline->op1, &opline->op2, value, (0?IS_TMP_VAR:IS_CV), EX(Ts) TSRMLS_CC); @@ -13890,7 +13890,7 @@ static int ZEND_ASSIGN_REF_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) if (IS_CV == IS_VAR && value_ptr_ptr && !(*value_ptr_ptr)->is_ref && - opline->extended_value == ZEND_RETURNS_FUNCTION && + opline->extended_value == ZEND_RETURNS_FUNCTION && !EX_T(opline->op2.u.var).var.fcall_returned_reference) { if (free_op2.var == NULL) { PZVAL_LOCK(*value_ptr_ptr); /* undo the effect of get_zval_ptr_ptr() */ @@ -14134,7 +14134,7 @@ static int ZEND_UNSET_DIM_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) free_offset = 1; } } - + if (zend_u_symtable_del(ht, Z_TYPE_P(offset), offset_key, offset_len+1) == SUCCESS && ht == &EG(symbol_table)) { zend_execute_data *ex; @@ -14242,7 +14242,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_VAR_CV(int prop_dim, ZEN long index; if (container) { - + zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); if (Z_TYPE_PP(container) == IS_ARRAY) { @@ -14399,7 +14399,7 @@ static int ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_A static int ZEND_CLONE_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *obj = _get_obj_zval_ptr_unused(TSRMLS_C); zend_class_entry *ce; zend_function *clone; @@ -14456,7 +14456,7 @@ static int ZEND_EXIT_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { if (IS_UNUSED != IS_UNUSED) { zend_op *opline = EX(opline); - + zval *ptr = NULL; if (Z_TYPE_P(ptr) == IS_LONG) { @@ -14725,7 +14725,7 @@ static int ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS static int zend_pre_incdec_property_helper_SPEC_UNUSED_CONST(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval **object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C); zval *object; zval *property = &opline->op2.u.constant; @@ -14817,7 +14817,7 @@ static int ZEND_PRE_DEC_OBJ_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int zend_post_incdec_property_helper_SPEC_UNUSED_CONST(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval **object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C); zval *object; zval *property = &opline->op2.u.constant; @@ -14910,7 +14910,7 @@ static int zend_fetch_property_address_read_helper_SPEC_UNUSED_CONST(int type, Z zend_op *opline = EX(opline); zval *container; zval **retval; - + retval = &EX_T(opline->result.u.var).var.ptr; EX_T(opline->result.u.var).var.ptr_ptr = retval; @@ -14934,7 +14934,7 @@ static int zend_fetch_property_address_read_helper_SPEC_UNUSED_CONST(int type, Z SELECTIVE_PZVAL_LOCK(*retval, &opline->result); AI_USE_PTR(EX_T(opline->result.u.var).var); } else { - + zval *offset = &opline->op2.u.constant; if (0) { @@ -14970,7 +14970,7 @@ static int ZEND_FETCH_OBJ_R_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_FETCH_OBJ_W_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *property = &opline->op2.u.constant; if (opline->extended_value == ZEND_FETCH_ADD_LOCK && IS_UNUSED != IS_CV) { @@ -14994,7 +14994,7 @@ static int ZEND_FETCH_OBJ_W_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_FETCH_OBJ_RW_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *property = &opline->op2.u.constant; if (0) { @@ -15021,7 +15021,7 @@ static int ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)) { /* Behave like FETCH_OBJ_W */ - + zval *property = &opline->op2.u.constant; if (0) { @@ -15075,7 +15075,7 @@ static int ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_op *op_data = opline+1; - + zval **object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C); zend_assign_to_object(&opline->result, object_ptr, &opline->op2, &op_data->op1, EX(Ts), ZEND_ASSIGN_OBJ TSRMLS_CC); @@ -15089,7 +15089,7 @@ static int ZEND_ASSIGN_DIM_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_op *op_data = opline+1; - + zval **object_ptr; if (IS_UNUSED == IS_CV || EX_T(opline->op1.u.var).var.ptr_ptr) { @@ -15124,7 +15124,7 @@ static int ZEND_INIT_METHOD_CALL_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_A zval *function_name; char *function_name_strval; int function_name_strlen; - + /* FIXME: type is default */ zend_uchar type = UG(unicode)?IS_UNICODE:IS_STRING; @@ -15219,7 +15219,7 @@ static int ZEND_FETCH_CONSTANT_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARG static int ZEND_ADD_ARRAY_ELEMENT_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *array_ptr = &EX_T(opline->result.u.var).tmp_var; zval *expr_ptr, **expr_ptr_ptr = NULL; zval *offset=&opline->op2.u.constant; @@ -15301,7 +15301,7 @@ static int ZEND_INIT_ARRAY_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_UNSET_DIM_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C); zval *offset = &opline->op2.u.constant; long index; @@ -15347,7 +15347,7 @@ static int ZEND_UNSET_DIM_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) free_offset = 1; } } - + if (zend_u_symtable_del(ht, Z_TYPE_P(offset), offset_key, offset_len+1) == SUCCESS && ht == &EG(symbol_table)) { zend_execute_data *ex; @@ -15415,7 +15415,7 @@ static int ZEND_UNSET_DIM_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_UNSET_OBJ_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C); zval *offset = &opline->op2.u.constant; @@ -15446,14 +15446,14 @@ static int ZEND_UNSET_OBJ_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int zend_isset_isempty_dim_prop_obj_handler_SPEC_UNUSED_CONST(int prop_dim, ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C); zval **value = NULL; int result = 0; long index; if (container) { - + zval *offset = &opline->op2.u.constant; if (Z_TYPE_PP(container) == IS_ARRAY) { @@ -16046,7 +16046,7 @@ static int zend_fetch_property_address_read_helper_SPEC_UNUSED_TMP(int type, ZEN zend_op *opline = EX(opline); zval *container; zval **retval; - + retval = &EX_T(opline->result.u.var).var.ptr; EX_T(opline->result.u.var).var.ptr_ptr = retval; @@ -16211,7 +16211,7 @@ static int ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_op *op_data = opline+1; - + zval **object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C); zend_assign_to_object(&opline->result, object_ptr, &opline->op2, &op_data->op1, EX(Ts), ZEND_ASSIGN_OBJ TSRMLS_CC); @@ -16225,7 +16225,7 @@ static int ZEND_ASSIGN_DIM_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_op *op_data = opline+1; - + zval **object_ptr; if (IS_UNUSED == IS_CV || EX_T(opline->op1.u.var).var.ptr_ptr) { @@ -16442,7 +16442,7 @@ static int ZEND_UNSET_DIM_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) free_offset = 1; } } - + if (zend_u_symtable_del(ht, Z_TYPE_P(offset), offset_key, offset_len+1) == SUCCESS && ht == &EG(symbol_table)) { zend_execute_data *ex; @@ -16541,7 +16541,7 @@ static int ZEND_UNSET_OBJ_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int zend_isset_isempty_dim_prop_obj_handler_SPEC_UNUSED_TMP(int prop_dim, ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C); zval **value = NULL; int result = 0; @@ -17141,7 +17141,7 @@ static int zend_fetch_property_address_read_helper_SPEC_UNUSED_VAR(int type, ZEN zend_op *opline = EX(opline); zval *container; zval **retval; - + retval = &EX_T(opline->result.u.var).var.ptr; EX_T(opline->result.u.var).var.ptr_ptr = retval; @@ -17306,7 +17306,7 @@ static int ZEND_ASSIGN_OBJ_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_op *op_data = opline+1; - + zval **object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C); zend_assign_to_object(&opline->result, object_ptr, &opline->op2, &op_data->op1, EX(Ts), ZEND_ASSIGN_OBJ TSRMLS_CC); @@ -17320,7 +17320,7 @@ static int ZEND_ASSIGN_DIM_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_op *op_data = opline+1; - + zval **object_ptr; if (IS_UNUSED == IS_CV || EX_T(opline->op1.u.var).var.ptr_ptr) { @@ -17537,7 +17537,7 @@ static int ZEND_UNSET_DIM_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) free_offset = 1; } } - + if (zend_u_symtable_del(ht, Z_TYPE_P(offset), offset_key, offset_len+1) == SUCCESS && ht == &EG(symbol_table)) { zend_execute_data *ex; @@ -17636,7 +17636,7 @@ static int ZEND_UNSET_OBJ_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int zend_isset_isempty_dim_prop_obj_handler_SPEC_UNUSED_VAR(int prop_dim, ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C); zval **value = NULL; int result = 0; @@ -18051,7 +18051,7 @@ static int ZEND_ASSIGN_DIM_SPEC_UNUSED_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_op *op_data = opline+1; - + zval **object_ptr; if (IS_UNUSED == IS_CV || EX_T(opline->op1.u.var).var.ptr_ptr) { @@ -18083,7 +18083,7 @@ static int ZEND_ASSIGN_DIM_SPEC_UNUSED_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_ADD_ARRAY_ELEMENT_SPEC_UNUSED_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *array_ptr = &EX_T(opline->result.u.var).tmp_var; zval *expr_ptr, **expr_ptr_ptr = NULL; zval *offset=NULL; @@ -18417,7 +18417,7 @@ static int ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int zend_pre_incdec_property_helper_SPEC_UNUSED_CV(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval **object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C); zval *object; zval *property = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); @@ -18509,7 +18509,7 @@ static int ZEND_PRE_DEC_OBJ_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int zend_post_incdec_property_helper_SPEC_UNUSED_CV(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval **object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C); zval *object; zval *property = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); @@ -18602,7 +18602,7 @@ static int zend_fetch_property_address_read_helper_SPEC_UNUSED_CV(int type, ZEND zend_op *opline = EX(opline); zval *container; zval **retval; - + retval = &EX_T(opline->result.u.var).var.ptr; EX_T(opline->result.u.var).var.ptr_ptr = retval; @@ -18626,7 +18626,7 @@ static int zend_fetch_property_address_read_helper_SPEC_UNUSED_CV(int type, ZEND SELECTIVE_PZVAL_LOCK(*retval, &opline->result); AI_USE_PTR(EX_T(opline->result.u.var).var); } else { - + zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); if (0) { @@ -18662,7 +18662,7 @@ static int ZEND_FETCH_OBJ_R_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_FETCH_OBJ_W_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *property = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); if (opline->extended_value == ZEND_FETCH_ADD_LOCK && IS_UNUSED != IS_CV) { @@ -18686,7 +18686,7 @@ static int ZEND_FETCH_OBJ_W_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_FETCH_OBJ_RW_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *property = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); if (0) { @@ -18713,7 +18713,7 @@ static int ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_AR if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)) { /* Behave like FETCH_OBJ_W */ - + zval *property = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); if (0) { @@ -18767,7 +18767,7 @@ static int ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_op *op_data = opline+1; - + zval **object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C); zend_assign_to_object(&opline->result, object_ptr, &opline->op2, &op_data->op1, EX(Ts), ZEND_ASSIGN_OBJ TSRMLS_CC); @@ -18781,7 +18781,7 @@ static int ZEND_ASSIGN_DIM_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_op *op_data = opline+1; - + zval **object_ptr; if (IS_UNUSED == IS_CV || EX_T(opline->op1.u.var).var.ptr_ptr) { @@ -18816,7 +18816,7 @@ static int ZEND_INIT_METHOD_CALL_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS zval *function_name; char *function_name_strval; int function_name_strlen; - + /* FIXME: type is default */ zend_uchar type = UG(unicode)?IS_UNICODE:IS_STRING; @@ -18868,7 +18868,7 @@ static int ZEND_INIT_METHOD_CALL_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS static int ZEND_ADD_ARRAY_ELEMENT_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *array_ptr = &EX_T(opline->result.u.var).tmp_var; zval *expr_ptr, **expr_ptr_ptr = NULL; zval *offset=_get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); @@ -18950,7 +18950,7 @@ static int ZEND_INIT_ARRAY_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_UNSET_DIM_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C); zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); long index; @@ -18996,7 +18996,7 @@ static int ZEND_UNSET_DIM_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) free_offset = 1; } } - + if (zend_u_symtable_del(ht, Z_TYPE_P(offset), offset_key, offset_len+1) == SUCCESS && ht == &EG(symbol_table)) { zend_execute_data *ex; @@ -19064,7 +19064,7 @@ static int ZEND_UNSET_DIM_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_UNSET_OBJ_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C); zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); @@ -19095,14 +19095,14 @@ static int ZEND_UNSET_OBJ_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int zend_isset_isempty_dim_prop_obj_handler_SPEC_UNUSED_CV(int prop_dim, ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C); zval **value = NULL; int result = 0; long index; if (container) { - + zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); if (Z_TYPE_PP(container) == IS_ARRAY) { @@ -19257,7 +19257,7 @@ static int ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLE static int ZEND_BW_NOT_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + bitwise_not_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); @@ -19268,7 +19268,7 @@ static int ZEND_BW_NOT_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_BOOL_NOT_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + boolean_not_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); @@ -19279,7 +19279,7 @@ static int ZEND_BOOL_NOT_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_PRE_INC_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval **var_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC); if (!var_ptr) { @@ -19321,7 +19321,7 @@ static int ZEND_PRE_INC_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_PRE_DEC_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval **var_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC); if (!var_ptr) { @@ -19363,7 +19363,7 @@ static int ZEND_PRE_DEC_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_POST_INC_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval **var_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC); if (!var_ptr) { @@ -19400,7 +19400,7 @@ static int ZEND_POST_INC_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_POST_DEC_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval **var_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC); if (!var_ptr) { @@ -19437,7 +19437,7 @@ static int ZEND_POST_DEC_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_ECHO_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *z = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC); UErrorCode status = U_ZERO_ERROR; @@ -19604,7 +19604,7 @@ static int ZEND_FETCH_IS_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_JMPZ_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + int ret = i_zend_is_true(_get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC)); if (!ret) { @@ -19620,7 +19620,7 @@ static int ZEND_JMPZ_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_JMPNZ_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + int ret = i_zend_is_true(_get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC)); if (ret) { @@ -19636,7 +19636,7 @@ static int ZEND_JMPNZ_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_JMPZNZ_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + int retval = i_zend_is_true(_get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC)); if (retval) { @@ -19655,7 +19655,7 @@ static int ZEND_JMPZNZ_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_JMPZ_EX_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + int retval = i_zend_is_true(_get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC)); Z_LVAL(EX_T(opline->result.u.var).tmp_var) = retval; @@ -19672,7 +19672,7 @@ static int ZEND_JMPZ_EX_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_JMPNZ_EX_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + int retval = i_zend_is_true(_get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC)); Z_LVAL(EX_T(opline->result.u.var).tmp_var) = retval; @@ -19691,7 +19691,7 @@ static int ZEND_RETURN_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_op *opline = EX(opline); zval *retval_ptr; zval **retval_ptr_ptr; - + if (EG(active_op_array)->return_reference == ZEND_RETURN_REF) { @@ -19776,7 +19776,7 @@ static int ZEND_THROW_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_op *opline = EX(opline); zval *value; zval *exception; - + value = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC); @@ -19805,7 +19805,7 @@ static int ZEND_SEND_VAL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zval *valptr; zval *value; - + value = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC); @@ -19824,7 +19824,7 @@ static int zend_send_by_var_helper_SPEC_CV(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *varptr; - + varptr = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC); if (varptr == &EG(uninitialized_zval)) { @@ -19864,8 +19864,8 @@ static int ZEND_SEND_VAR_NO_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) varptr = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC); if ((!(opline->extended_value & ZEND_ARG_SEND_FUNCTION) || EX_T(opline->op1.u.var).var.fcall_returned_reference) && - varptr != &EG(uninitialized_zval) && - (PZVAL_IS_REF(varptr) || + varptr != &EG(uninitialized_zval) && + (PZVAL_IS_REF(varptr) || (varptr->refcount == 1 && (IS_CV == IS_CV || free_op1.var)))) { varptr->is_ref = 1; varptr->refcount++; @@ -19888,7 +19888,7 @@ static int ZEND_SEND_VAR_NO_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_SEND_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval **varptr_ptr; zval *varptr; varptr_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC); @@ -19919,7 +19919,7 @@ static int ZEND_SEND_VAR_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_BOOL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + /* PHP 3.0 returned "" for false and 1 for true, here we use 0 and 1 for now */ Z_LVAL(EX_T(opline->result.u.var).tmp_var) = i_zend_is_true(_get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC)); @@ -19931,7 +19931,7 @@ static int ZEND_BOOL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_CLONE_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *obj = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC); zend_class_entry *ce; zend_function *clone; @@ -19987,7 +19987,7 @@ static int ZEND_CLONE_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_CAST_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *expr = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC); zval *result = &EX_T(opline->result.u.var).tmp_var; @@ -20047,7 +20047,7 @@ static int ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_op_array *new_op_array=NULL; zval **original_return_value = EG(return_value_ptr_ptr); int return_value_used; - + zval *inc_filename = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC); zval tmp_inc_filename; zend_bool failure_retval=0; @@ -20172,7 +20172,7 @@ static int ZEND_UNSET_VAR_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_op *opline = EX(opline); zval tmp, *varname; HashTable *target_symbol_table; - + varname = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC); @@ -20186,9 +20186,9 @@ static int ZEND_UNSET_VAR_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) { zend_std_unset_static_property(EX_T(opline->op2.u.var).class_entry, Z_TYPE_P(varname), Z_UNIVAL_P(varname), Z_UNILEN_P(varname) TSRMLS_CC); } else { - target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), BP_VAR_IS, varname TSRMLS_CC); + target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), BP_VAR_IS, varname TSRMLS_CC); if (zend_u_hash_del(target_symbol_table, Z_TYPE_P(varname), Z_UNIVAL_P(varname), Z_UNILEN_P(varname)+1) == SUCCESS) { - zend_execute_data *ex = execute_data; + zend_execute_data *ex = execute_data; ulong hash_value = zend_u_inline_hash_func(Z_TYPE_P(varname), Z_UNIVAL_P(varname), Z_UNILEN_P(varname)+1); do { @@ -20219,7 +20219,7 @@ static int ZEND_UNSET_VAR_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_FE_RESET_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *array_ptr, **array_ptr_ptr; HashTable *fe_ht; zend_object_iterator *iter = NULL; @@ -20235,7 +20235,7 @@ static int ZEND_FE_RESET_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_error(E_WARNING, "foreach() can not iterate over objects without PHP class"); ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num); } - + ce = Z_OBJCE_PP(array_ptr_ptr); if (!ce || ce->get_iterator == NULL) { SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr); @@ -20343,7 +20343,7 @@ static int ZEND_FE_RESET_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_ISSET_ISEMPTY_VAR_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval tmp, *varname = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_IS TSRMLS_CC); zval **value; zend_bool isset = 1; @@ -20398,7 +20398,7 @@ static int ZEND_EXIT_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { if (IS_CV != IS_UNUSED) { zend_op *opline = EX(opline); - + zval *ptr = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC); if (Z_TYPE_P(ptr) == IS_LONG) { @@ -20415,7 +20415,7 @@ static int ZEND_EXIT_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_QM_ASSIGN_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *value = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC); EX_T(opline->result.u.var).tmp_var = *value; @@ -20429,7 +20429,7 @@ static int ZEND_QM_ASSIGN_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_INSTANCEOF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *expr = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC); zend_bool result; @@ -20446,7 +20446,7 @@ static int ZEND_INSTANCEOF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_U_NORMALIZE_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *string = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC); zval *result = &EX_T(opline->result.u.var).tmp_var; @@ -20481,7 +20481,7 @@ static int ZEND_U_NORMALIZE_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_ADD_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + add_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), @@ -20494,7 +20494,7 @@ static int ZEND_ADD_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_SUB_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + sub_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), @@ -20507,7 +20507,7 @@ static int ZEND_SUB_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_MUL_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + mul_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), @@ -20520,7 +20520,7 @@ static int ZEND_MUL_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_DIV_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + div_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), @@ -20533,7 +20533,7 @@ static int ZEND_DIV_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_MOD_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + mod_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), @@ -20546,7 +20546,7 @@ static int ZEND_MOD_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_SL_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + shift_left_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), @@ -20559,7 +20559,7 @@ static int ZEND_SL_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_SR_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + shift_right_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), @@ -20572,7 +20572,7 @@ static int ZEND_SR_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_CONCAT_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + concat_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), @@ -20585,7 +20585,7 @@ static int ZEND_CONCAT_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_IS_IDENTICAL_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + is_identical_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), @@ -20598,7 +20598,7 @@ static int ZEND_IS_IDENTICAL_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_IS_NOT_IDENTICAL_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + is_not_identical_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), @@ -20611,7 +20611,7 @@ static int ZEND_IS_NOT_IDENTICAL_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_IS_EQUAL_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + is_equal_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), @@ -20624,7 +20624,7 @@ static int ZEND_IS_EQUAL_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_IS_NOT_EQUAL_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + is_not_equal_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), @@ -20637,7 +20637,7 @@ static int ZEND_IS_NOT_EQUAL_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_IS_SMALLER_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + is_smaller_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), @@ -20650,7 +20650,7 @@ static int ZEND_IS_SMALLER_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_IS_SMALLER_OR_EQUAL_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + is_smaller_or_equal_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), @@ -20663,7 +20663,7 @@ static int ZEND_IS_SMALLER_OR_EQUAL_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_AR static int ZEND_BW_OR_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + bitwise_or_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), @@ -20676,7 +20676,7 @@ static int ZEND_BW_OR_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_BW_AND_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + bitwise_and_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), @@ -20689,7 +20689,7 @@ static int ZEND_BW_AND_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_BW_XOR_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), @@ -20702,7 +20702,7 @@ static int ZEND_BW_XOR_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_BOOL_XOR_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + boolean_xor_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), @@ -20967,7 +20967,7 @@ static int ZEND_ASSIGN_BW_XOR_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int zend_pre_incdec_property_helper_SPEC_CV_CONST(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval **object_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC); zval *object; zval *property = &opline->op2.u.constant; @@ -21059,7 +21059,7 @@ static int ZEND_PRE_DEC_OBJ_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int zend_post_incdec_property_helper_SPEC_CV_CONST(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval **object_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC); zval *object; zval *property = &opline->op2.u.constant; @@ -21150,7 +21150,7 @@ static int ZEND_POST_DEC_OBJ_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_FETCH_DIM_R_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *dim = &opline->op2.u.constant; if (opline->extended_value == ZEND_FETCH_ADD_LOCK && IS_CV != IS_CV) { @@ -21165,7 +21165,7 @@ static int ZEND_FETCH_DIM_R_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_FETCH_DIM_W_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *dim = &opline->op2.u.constant; zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC), dim, 0, BP_VAR_W TSRMLS_CC); @@ -21177,7 +21177,7 @@ static int ZEND_FETCH_DIM_W_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_FETCH_DIM_RW_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *dim = &opline->op2.u.constant; zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC), dim, 0, BP_VAR_RW TSRMLS_CC); @@ -21189,7 +21189,7 @@ static int ZEND_FETCH_DIM_RW_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_FETCH_DIM_IS_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *dim = &opline->op2.u.constant; zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_IS TSRMLS_CC), dim, 0, BP_VAR_IS TSRMLS_CC); @@ -21201,10 +21201,10 @@ static int ZEND_FETCH_DIM_IS_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + int type = ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)?BP_VAR_W:BP_VAR_R; zval *dim; - + if (IS_CONST == IS_UNUSED && type == BP_VAR_R) { zend_error_noreturn(E_ERROR, "Cannot use [] for reading"); } @@ -21218,7 +21218,7 @@ static int ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARG static int ZEND_FETCH_DIM_UNSET_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_UNSET TSRMLS_CC); zval *dim = &opline->op2.u.constant; @@ -21255,7 +21255,7 @@ static int zend_fetch_property_address_read_helper_SPEC_CV_CONST(int type, ZEND_ zend_op *opline = EX(opline); zval *container; zval **retval; - + retval = &EX_T(opline->result.u.var).var.ptr; EX_T(opline->result.u.var).var.ptr_ptr = retval; @@ -21279,7 +21279,7 @@ static int zend_fetch_property_address_read_helper_SPEC_CV_CONST(int type, ZEND_ SELECTIVE_PZVAL_LOCK(*retval, &opline->result); AI_USE_PTR(EX_T(opline->result.u.var).var); } else { - + zval *offset = &opline->op2.u.constant; if (0) { @@ -21315,7 +21315,7 @@ static int ZEND_FETCH_OBJ_R_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_FETCH_OBJ_W_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *property = &opline->op2.u.constant; if (opline->extended_value == ZEND_FETCH_ADD_LOCK && IS_CV != IS_CV) { @@ -21339,7 +21339,7 @@ static int ZEND_FETCH_OBJ_W_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_FETCH_OBJ_RW_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *property = &opline->op2.u.constant; if (0) { @@ -21366,7 +21366,7 @@ static int ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARG if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)) { /* Behave like FETCH_OBJ_W */ - + zval *property = &opline->op2.u.constant; if (0) { @@ -21420,7 +21420,7 @@ static int ZEND_ASSIGN_OBJ_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_op *op_data = opline+1; - + zval **object_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC); zend_assign_to_object(&opline->result, object_ptr, &opline->op2, &op_data->op1, EX(Ts), ZEND_ASSIGN_OBJ TSRMLS_CC); @@ -21434,7 +21434,7 @@ static int ZEND_ASSIGN_DIM_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_op *op_data = opline+1; - + zval **object_ptr; if (IS_CV == IS_CV || EX_T(opline->op1.u.var).var.ptr_ptr) { @@ -21466,7 +21466,7 @@ static int ZEND_ASSIGN_DIM_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_ASSIGN_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *value = &opline->op2.u.constant; zend_assign_to_variable(&opline->result, &opline->op1, &opline->op2, value, (0?IS_TMP_VAR:IS_CONST), EX(Ts) TSRMLS_CC); @@ -21481,7 +21481,7 @@ static int ZEND_INIT_METHOD_CALL_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zval *function_name; char *function_name_strval; int function_name_strlen; - + /* FIXME: type is default */ zend_uchar type = UG(unicode)?IS_UNICODE:IS_STRING; @@ -21534,7 +21534,7 @@ static int ZEND_CASE_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); int switch_expr_is_overloaded=0; - + if (IS_CV==IS_VAR) { if (EX_T(opline->op1.u.var).var.ptr_ptr) { @@ -21564,7 +21564,7 @@ static int ZEND_CASE_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *array_ptr = &EX_T(opline->result.u.var).tmp_var; zval *expr_ptr, **expr_ptr_ptr = NULL; zval *offset=&opline->op2.u.constant; @@ -21646,7 +21646,7 @@ static int ZEND_INIT_ARRAY_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_UNSET_DIM_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_UNSET TSRMLS_CC); zval *offset = &opline->op2.u.constant; long index; @@ -21692,7 +21692,7 @@ static int ZEND_UNSET_DIM_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) free_offset = 1; } } - + if (zend_u_symtable_del(ht, Z_TYPE_P(offset), offset_key, offset_len+1) == SUCCESS && ht == &EG(symbol_table)) { zend_execute_data *ex; @@ -21760,7 +21760,7 @@ static int ZEND_UNSET_DIM_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_UNSET_OBJ_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_UNSET TSRMLS_CC); zval *offset = &opline->op2.u.constant; @@ -21791,14 +21791,14 @@ static int ZEND_UNSET_OBJ_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int zend_isset_isempty_dim_prop_obj_handler_SPEC_CV_CONST(int prop_dim, ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_IS TSRMLS_CC); zval **value = NULL; int result = 0; long index; if (container) { - + zval *offset = &opline->op2.u.constant; if (Z_TYPE_PP(container) == IS_ARRAY) { @@ -22677,7 +22677,7 @@ static int ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_free_op free_op2; int type = ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)?BP_VAR_W:BP_VAR_R; zval *dim; - + if (IS_TMP_VAR == IS_UNUSED && type == BP_VAR_R) { zend_error_noreturn(E_ERROR, "Cannot use [] for reading"); } @@ -22728,7 +22728,7 @@ static int zend_fetch_property_address_read_helper_SPEC_CV_TMP(int type, ZEND_OP zend_op *opline = EX(opline); zval *container; zval **retval; - + retval = &EX_T(opline->result.u.var).var.ptr; EX_T(opline->result.u.var).var.ptr_ptr = retval; @@ -22893,7 +22893,7 @@ static int ZEND_ASSIGN_OBJ_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_op *op_data = opline+1; - + zval **object_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC); zend_assign_to_object(&opline->result, object_ptr, &opline->op2, &op_data->op1, EX(Ts), ZEND_ASSIGN_OBJ TSRMLS_CC); @@ -22907,7 +22907,7 @@ static int ZEND_ASSIGN_DIM_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_op *op_data = opline+1; - + zval **object_ptr; if (IS_CV == IS_CV || EX_T(opline->op1.u.var).var.ptr_ptr) { @@ -23168,7 +23168,7 @@ static int ZEND_UNSET_DIM_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) free_offset = 1; } } - + if (zend_u_symtable_del(ht, Z_TYPE_P(offset), offset_key, offset_len+1) == SUCCESS && ht == &EG(symbol_table)) { zend_execute_data *ex; @@ -23267,7 +23267,7 @@ static int ZEND_UNSET_OBJ_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int zend_isset_isempty_dim_prop_obj_handler_SPEC_CV_TMP(int prop_dim, ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_IS TSRMLS_CC); zval **value = NULL; int result = 0; @@ -24153,7 +24153,7 @@ static int ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_free_op free_op2; int type = ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)?BP_VAR_W:BP_VAR_R; zval *dim; - + if (IS_VAR == IS_UNUSED && type == BP_VAR_R) { zend_error_noreturn(E_ERROR, "Cannot use [] for reading"); } @@ -24204,7 +24204,7 @@ static int zend_fetch_property_address_read_helper_SPEC_CV_VAR(int type, ZEND_OP zend_op *opline = EX(opline); zval *container; zval **retval; - + retval = &EX_T(opline->result.u.var).var.ptr; EX_T(opline->result.u.var).var.ptr_ptr = retval; @@ -24369,7 +24369,7 @@ static int ZEND_ASSIGN_OBJ_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_op *op_data = opline+1; - + zval **object_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC); zend_assign_to_object(&opline->result, object_ptr, &opline->op2, &op_data->op1, EX(Ts), ZEND_ASSIGN_OBJ TSRMLS_CC); @@ -24383,7 +24383,7 @@ static int ZEND_ASSIGN_DIM_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_op *op_data = opline+1; - + zval **object_ptr; if (IS_CV == IS_CV || EX_T(opline->op1.u.var).var.ptr_ptr) { @@ -24436,7 +24436,7 @@ static int ZEND_ASSIGN_REF_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) if (IS_VAR == IS_VAR && value_ptr_ptr && !(*value_ptr_ptr)->is_ref && - opline->extended_value == ZEND_RETURNS_FUNCTION && + opline->extended_value == ZEND_RETURNS_FUNCTION && !EX_T(opline->op2.u.var).var.fcall_returned_reference) { if (free_op2.var == NULL) { PZVAL_LOCK(*value_ptr_ptr); /* undo the effect of get_zval_ptr_ptr() */ @@ -24681,7 +24681,7 @@ static int ZEND_UNSET_DIM_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) free_offset = 1; } } - + if (zend_u_symtable_del(ht, Z_TYPE_P(offset), offset_key, offset_len+1) == SUCCESS && ht == &EG(symbol_table)) { zend_execute_data *ex; @@ -24780,7 +24780,7 @@ static int ZEND_UNSET_OBJ_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int zend_isset_isempty_dim_prop_obj_handler_SPEC_CV_VAR(int prop_dim, ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_IS TSRMLS_CC); zval **value = NULL; int result = 0; @@ -25194,7 +25194,7 @@ static int ZEND_ASSIGN_BW_XOR_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_FETCH_DIM_W_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *dim = NULL; zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC), dim, 0, BP_VAR_W TSRMLS_CC); @@ -25206,7 +25206,7 @@ static int ZEND_FETCH_DIM_W_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_FETCH_DIM_RW_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *dim = NULL; zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC), dim, 0, BP_VAR_RW TSRMLS_CC); @@ -25218,10 +25218,10 @@ static int ZEND_FETCH_DIM_RW_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + int type = ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)?BP_VAR_W:BP_VAR_R; zval *dim; - + if (IS_UNUSED == IS_UNUSED && type == BP_VAR_R) { zend_error_noreturn(E_ERROR, "Cannot use [] for reading"); } @@ -25236,7 +25236,7 @@ static int ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_op *op_data = opline+1; - + zval **object_ptr; if (IS_CV == IS_CV || EX_T(opline->op1.u.var).var.ptr_ptr) { @@ -25268,7 +25268,7 @@ static int ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *array_ptr = &EX_T(opline->result.u.var).tmp_var; zval *expr_ptr, **expr_ptr_ptr = NULL; zval *offset=NULL; @@ -25350,7 +25350,7 @@ static int ZEND_INIT_ARRAY_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_ADD_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + add_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), @@ -25363,7 +25363,7 @@ static int ZEND_ADD_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_SUB_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + sub_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), @@ -25376,7 +25376,7 @@ static int ZEND_SUB_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_MUL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + mul_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), @@ -25389,7 +25389,7 @@ static int ZEND_MUL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_DIV_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + div_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), @@ -25402,7 +25402,7 @@ static int ZEND_DIV_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_MOD_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + mod_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), @@ -25415,7 +25415,7 @@ static int ZEND_MOD_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_SL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + shift_left_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), @@ -25428,7 +25428,7 @@ static int ZEND_SL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_SR_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + shift_right_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), @@ -25441,7 +25441,7 @@ static int ZEND_SR_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_CONCAT_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + concat_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), @@ -25454,7 +25454,7 @@ static int ZEND_CONCAT_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_IS_IDENTICAL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + is_identical_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), @@ -25467,7 +25467,7 @@ static int ZEND_IS_IDENTICAL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_IS_NOT_IDENTICAL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + is_not_identical_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), @@ -25480,7 +25480,7 @@ static int ZEND_IS_NOT_IDENTICAL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_IS_EQUAL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + is_equal_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), @@ -25493,7 +25493,7 @@ static int ZEND_IS_EQUAL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_IS_NOT_EQUAL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + is_not_equal_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), @@ -25506,7 +25506,7 @@ static int ZEND_IS_NOT_EQUAL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_IS_SMALLER_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + is_smaller_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), @@ -25519,7 +25519,7 @@ static int ZEND_IS_SMALLER_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_IS_SMALLER_OR_EQUAL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + is_smaller_or_equal_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), @@ -25532,7 +25532,7 @@ static int ZEND_IS_SMALLER_OR_EQUAL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_BW_OR_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + bitwise_or_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), @@ -25545,7 +25545,7 @@ static int ZEND_BW_OR_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_BW_AND_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + bitwise_and_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), @@ -25558,7 +25558,7 @@ static int ZEND_BW_AND_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_BW_XOR_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), @@ -25571,7 +25571,7 @@ static int ZEND_BW_XOR_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_BOOL_XOR_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + boolean_xor_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), @@ -25836,7 +25836,7 @@ static int ZEND_ASSIGN_BW_XOR_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int zend_pre_incdec_property_helper_SPEC_CV_CV(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval **object_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC); zval *object; zval *property = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); @@ -25928,7 +25928,7 @@ static int ZEND_PRE_DEC_OBJ_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int zend_post_incdec_property_helper_SPEC_CV_CV(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval **object_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC); zval *object; zval *property = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); @@ -26019,7 +26019,7 @@ static int ZEND_POST_DEC_OBJ_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_FETCH_DIM_R_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *dim = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); if (opline->extended_value == ZEND_FETCH_ADD_LOCK && IS_CV != IS_CV) { @@ -26034,7 +26034,7 @@ static int ZEND_FETCH_DIM_R_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_FETCH_DIM_W_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *dim = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC), dim, 0, BP_VAR_W TSRMLS_CC); @@ -26046,7 +26046,7 @@ static int ZEND_FETCH_DIM_W_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_FETCH_DIM_RW_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *dim = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC), dim, 0, BP_VAR_RW TSRMLS_CC); @@ -26058,7 +26058,7 @@ static int ZEND_FETCH_DIM_RW_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_FETCH_DIM_IS_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *dim = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_IS TSRMLS_CC), dim, 0, BP_VAR_IS TSRMLS_CC); @@ -26070,10 +26070,10 @@ static int ZEND_FETCH_DIM_IS_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + int type = ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)?BP_VAR_W:BP_VAR_R; zval *dim; - + if (IS_CV == IS_UNUSED && type == BP_VAR_R) { zend_error_noreturn(E_ERROR, "Cannot use [] for reading"); } @@ -26087,7 +26087,7 @@ static int ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_FETCH_DIM_UNSET_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_UNSET TSRMLS_CC); zval *dim = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); @@ -26124,7 +26124,7 @@ static int zend_fetch_property_address_read_helper_SPEC_CV_CV(int type, ZEND_OPC zend_op *opline = EX(opline); zval *container; zval **retval; - + retval = &EX_T(opline->result.u.var).var.ptr; EX_T(opline->result.u.var).var.ptr_ptr = retval; @@ -26148,7 +26148,7 @@ static int zend_fetch_property_address_read_helper_SPEC_CV_CV(int type, ZEND_OPC SELECTIVE_PZVAL_LOCK(*retval, &opline->result); AI_USE_PTR(EX_T(opline->result.u.var).var); } else { - + zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); if (0) { @@ -26184,7 +26184,7 @@ static int ZEND_FETCH_OBJ_R_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_FETCH_OBJ_W_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *property = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); if (opline->extended_value == ZEND_FETCH_ADD_LOCK && IS_CV != IS_CV) { @@ -26208,7 +26208,7 @@ static int ZEND_FETCH_OBJ_W_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_FETCH_OBJ_RW_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *property = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); if (0) { @@ -26235,7 +26235,7 @@ static int ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)) { /* Behave like FETCH_OBJ_W */ - + zval *property = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); if (0) { @@ -26289,7 +26289,7 @@ static int ZEND_ASSIGN_OBJ_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_op *op_data = opline+1; - + zval **object_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC); zend_assign_to_object(&opline->result, object_ptr, &opline->op2, &op_data->op1, EX(Ts), ZEND_ASSIGN_OBJ TSRMLS_CC); @@ -26303,7 +26303,7 @@ static int ZEND_ASSIGN_DIM_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_op *op_data = opline+1; - + zval **object_ptr; if (IS_CV == IS_CV || EX_T(opline->op1.u.var).var.ptr_ptr) { @@ -26335,7 +26335,7 @@ static int ZEND_ASSIGN_DIM_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_ASSIGN_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *value = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); zend_assign_to_variable(&opline->result, &opline->op1, &opline->op2, value, (0?IS_TMP_VAR:IS_CV), EX(Ts) TSRMLS_CC); @@ -26354,7 +26354,7 @@ static int ZEND_ASSIGN_REF_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) if (IS_CV == IS_VAR && value_ptr_ptr && !(*value_ptr_ptr)->is_ref && - opline->extended_value == ZEND_RETURNS_FUNCTION && + opline->extended_value == ZEND_RETURNS_FUNCTION && !EX_T(opline->op2.u.var).var.fcall_returned_reference) { if (free_op2.var == NULL) { PZVAL_LOCK(*value_ptr_ptr); /* undo the effect of get_zval_ptr_ptr() */ @@ -26385,7 +26385,7 @@ static int ZEND_INIT_METHOD_CALL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zval *function_name; char *function_name_strval; int function_name_strlen; - + /* FIXME: type is default */ zend_uchar type = UG(unicode)?IS_UNICODE:IS_STRING; @@ -26438,7 +26438,7 @@ static int ZEND_CASE_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); int switch_expr_is_overloaded=0; - + if (IS_CV==IS_VAR) { if (EX_T(opline->op1.u.var).var.ptr_ptr) { @@ -26468,7 +26468,7 @@ static int ZEND_CASE_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval *array_ptr = &EX_T(opline->result.u.var).tmp_var; zval *expr_ptr, **expr_ptr_ptr = NULL; zval *offset=_get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); @@ -26550,7 +26550,7 @@ static int ZEND_INIT_ARRAY_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_UNSET_DIM_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_UNSET TSRMLS_CC); zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); long index; @@ -26596,7 +26596,7 @@ static int ZEND_UNSET_DIM_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) free_offset = 1; } } - + if (zend_u_symtable_del(ht, Z_TYPE_P(offset), offset_key, offset_len+1) == SUCCESS && ht == &EG(symbol_table)) { zend_execute_data *ex; @@ -26664,7 +26664,7 @@ static int ZEND_UNSET_DIM_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_UNSET_OBJ_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_UNSET TSRMLS_CC); zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); @@ -26695,14 +26695,14 @@ static int ZEND_UNSET_OBJ_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int zend_isset_isempty_dim_prop_obj_handler_SPEC_CV_CV(int prop_dim, ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - + zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_IS TSRMLS_CC); zval **value = NULL; int result = 0; long index; if (container) { - + zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); if (Z_TYPE_PP(container) == IS_ARRAY) { diff --git a/Zend/zend_vm_execute.skl b/Zend/zend_vm_execute.skl index 9a3bd5038d..9dd40f9ef9 100644 --- a/Zend/zend_vm_execute.skl +++ b/Zend/zend_vm_execute.skl @@ -52,7 +52,7 @@ ZEND_API void {%EXECUTOR_NAME%}(zend_op_array *op_array TSRMLS_DC) */ EX(function_state).function_symbol_table = NULL; #endif - + while (1) { {%ZEND_VM_CONTINUE_LABEL%} #ifdef ZEND_WIN32 diff --git a/Zend/zend_vm_gen.php b/Zend/zend_vm_gen.php index 1821ef4eca..392c02491a 100644 --- a/Zend/zend_vm_gen.php +++ b/Zend/zend_vm_gen.php @@ -456,6 +456,9 @@ function gen_code($f, $spec, $kind, $code, $op1, $op2) { /* Remove unnecessary ';' */ $code = preg_replace('/^\s*;\s*$/m', '', $code); + /* Remove WS */ + $code = preg_replace('/[ \t]+\n/m', "\n", $code); + out($f, $code); } @@ -581,7 +584,7 @@ function gen_labels($f, $spec, $kind, $prolog) { // Try to use unspecialized handler $op2 = "ANY"; } - // Check if specialized handler is defined + // Check if specialized handler is defined if (isset($dsc["op1"][$op1]) && isset($dsc["op2"][$op2])) { // Emit pointer to specialized handler @@ -670,7 +673,7 @@ function gen_labels($f, $spec, $kind, $prolog) { function gen_null_handler($f) { static $done = 0; - // New and all executors with CALL threading model can use the same handler + // New and all executors with CALL threading model can use the same handler // for undefined opcodes, do we emit code for it only once if (!$done) { $done = 1; @@ -689,10 +692,10 @@ function gen_executor_code($f, $spec, $kind, $prolog) { if ($spec) { // Produce specialized executor $op1t = $op_types; - // for each op1.op_type + // for each op1.op_type foreach($op1t as $op1) { $op2t = $op_types; - // for each op2.op_type + // for each op2.op_type foreach($op2t as $op2) { // for each handlers in helpers in original order foreach ($list as $lineno => $dsc) { @@ -1068,7 +1071,7 @@ function gen_vm($def, $skel) { $code_len = strlen((string)$max_opcode); $f = fopen("zend_vm_opcodes.h", "w+") or die("ERROR: Cannot create zend_vm_opcodes.h\n"); - // Insert header + // Insert header out($f, $GLOBALS['header_text']); foreach ($opcodes as $code => $dsc) { @@ -1083,7 +1086,7 @@ function gen_vm($def, $skel) { $f = fopen("zend_vm_execute.h", "w+") or die("ERROR: Cannot create zend_vm_execute.h\n"); $executor_file = realpath("zend_vm_execute.h"); - // Insert header + // Insert header out($f, $GLOBALS['header_text']); // Support for ZEND_USER_OPCODE @@ -1158,8 +1161,8 @@ function gen_vm($def, $skel) { out($f, "}\n\n"); // Export handlers and helpers - if (count($export) > 0 && - !ZEND_VM_OLD_EXECUTOR && + if (count($export) > 0 && + !ZEND_VM_OLD_EXECUTOR && ZEND_VM_KIND != ZEND_VM_KIND_CALL) { out($f,"#undef EX\n"); out($f,"#define EX(element) execute_data->element\n\n"); -- 2.50.1