]> granicus.if.org Git - php/commitdiff
Avoid using a C++ reserved word
authorZeev Suraski <zeev@php.net>
Tue, 18 Feb 2003 17:18:28 +0000 (17:18 +0000)
committerZeev Suraski <zeev@php.net>
Tue, 18 Feb 2003 17:18:28 +0000 (17:18 +0000)
Zend/zend.h
Zend/zend_compile.c
Zend/zend_compile.h
Zend/zend_execute.c
Zend/zend_language_scanner.l
Zend/zend_opcode.c

index f6eca9989ed84edea1eab414407c3a6bc3734ddf..f8111bb74b6df906c21cc83a9a1fe4cfe7f1a220 100644 (file)
@@ -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;
index 6b76589f7e77cc77d71b403650ca16908017f280..2133d549f0438401dff0e0ff0e6511e8ee63238f 100644 (file)
@@ -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);
 }
 
 /*
index 83622a8f01046c1ba7488de11ee6fb9f8668d125..1ac590c5c419b86050bdf02b7d16a09c71543563 100644 (file)
@@ -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;
index 052f6e87c406ce0539c024cffbb2454a3de3a1d3..004f427a34fbf74767e02bb01942575f63784bee 100644 (file)
@@ -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) {
index d8f4d283620f6f1765280110db23e4761691c695..5869132cf5656c7423d96e7beb56b39e648d9b1a 100644 (file)
@@ -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);
 
index 32bc40226952c88501dd92f6ae5434f13d24097e..599b9880245a2602978cb14d111c8b8809bc0622 100644 (file)
@@ -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;