diff --git a/Zend/zend.h b/Zend/zend.h index f6eca9989ed..f8111bb74b6 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -319,7 +319,7 @@ struct _zend_class_entry { HashTable *static_members; HashTable constants_table; zend_function_entry *builtin_functions; - struct _zend_class_entry *namespace; + struct _zend_class_entry *ns; union _zend_function *constructor; union _zend_function *destructor; diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 6b76589f7e7..2133d549f04 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -937,7 +937,7 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n op_array.fn_flags = fn_flags; op_array.scope = CG(active_class_entry); - op_array.namespace = CG(active_namespace); + op_array.ns = CG(active_namespace); if (is_method) { char *short_class_name = CG(active_class_entry)->name; @@ -3222,7 +3222,7 @@ void zend_do_begin_namespace(znode *ns_token, znode *ns_name TSRMLS_DC) ns->constructor = emalloc(sizeof(zend_op_array)); init_op_array((zend_op_array *)ns->constructor, ZEND_USER_FUNCTION, INITIAL_OP_ARRAY_SIZE TSRMLS_CC); - ns->constructor->op_array.namespace = CG(active_namespace); + ns->constructor->op_array.ns = CG(active_namespace); ns_token->u.op_array = CG(active_op_array); @@ -3236,7 +3236,7 @@ void zend_do_begin_namespace(znode *ns_token, znode *ns_name TSRMLS_DC) void zend_do_end_namespace(znode *ns_token TSRMLS_DC) { - zend_namespace *ns = CG(active_op_array)->namespace; + zend_namespace *ns = CG(active_op_array)->ns; int handle = CG(handle_op_arrays); @@ -3245,7 +3245,7 @@ void zend_do_end_namespace(znode *ns_token TSRMLS_DC) pass_two(CG(active_op_array) TSRMLS_CC); CG(handle_op_arrays) = handle; - CG(active_op_array)->namespace = CG(active_namespace); + CG(active_op_array)->ns = CG(active_namespace); CG(active_namespace) = ns; CG(active_op_array) = ns_token->u.op_array; @@ -3321,7 +3321,7 @@ void zend_initialize_class_data(zend_class_entry *ce, zend_bool nullify_handlers ce->create_object = NULL; } - ce->namespace = CG(active_namespace); + ce->ns = CG(active_namespace); } /* diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index 83622a8f010..1ac590c5c41 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -118,7 +118,7 @@ struct _zend_op_array { char *function_name; /* MUST be the third element of this struct! */ zend_class_entry *scope; /* MUST be the fourth element of this struct! */ zend_uint fn_flags; /* MUST be the fifth element of this struct! */ - zend_namespace *namespace; + zend_namespace *ns; zend_uint *refcount; @@ -154,7 +154,7 @@ typedef struct _zend_internal_function { char *function_name; /* MUST be the third element of this struct! */ zend_class_entry *scope; /* MUST be the fourth element of this struct! */ zend_uint fn_flags; /* MUST be the fifth element of this struct! */ - zend_namespace *namespace; + zend_namespace *ns; void (*handler)(INTERNAL_FUNCTION_PARAMETERS); } zend_internal_function; @@ -170,7 +170,7 @@ typedef union _zend_function { char *function_name; zend_class_entry *scope; zend_uint fn_flags; - zend_namespace *namespace; + zend_namespace *ns; } common; zend_op_array op_array; diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 052f6e87c40..004f427a34f 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -1216,8 +1216,8 @@ ZEND_API void execute(zend_op_array *op_array TSRMLS_DC) */ EX(function_state).function_symbol_table = NULL; #endif - if(EG(active_namespace) != op_array->namespace) { - zend_switch_namespace(op_array->namespace TSRMLS_CC); + if(EG(active_namespace) != op_array->ns) { + zend_switch_namespace(op_array->ns TSRMLS_CC); } while (1) { diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l index d8f4d283620..5869132cf56 100644 --- a/Zend/zend_language_scanner.l +++ b/Zend/zend_language_scanner.l @@ -289,7 +289,7 @@ ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type TSR init_op_array(op_array, ZEND_USER_FUNCTION, INITIAL_OP_ARRAY_SIZE TSRMLS_CC); CG(in_compilation) = 1; CG(active_op_array) = op_array; - op_array->namespace = CG(active_namespace); + op_array->ns = CG(active_namespace); compiler_result = zendparse(TSRMLS_C); zend_do_return(&retval_znode, 0 TSRMLS_CC); CG(in_compilation) = original_in_compilation; @@ -403,7 +403,7 @@ zend_op_array *compile_string(zval *source_string, char *filename TSRMLS_DC) } else { init_op_array(op_array, ZEND_EVAL_CODE, INITIAL_OP_ARRAY_SIZE TSRMLS_CC); CG(active_op_array) = op_array; - op_array->namespace = CG(active_namespace); + op_array->ns = CG(active_namespace); BEGIN(ST_IN_SCRIPTING); compiler_result = zendparse(TSRMLS_C); diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c index 32bc4022695..599b9880245 100644 --- a/Zend/zend_opcode.c +++ b/Zend/zend_opcode.c @@ -78,7 +78,7 @@ void init_op_array(zend_op_array *op_array, zend_uchar type, int initial_ops_siz op_array->arg_types = NULL; op_array->scope = NULL; - op_array->namespace = NULL; + op_array->ns = NULL; op_array->brk_cont_array = NULL; op_array->last_brk_cont = 0;