Avoid using a C++ reserved word

This commit is contained in:
Zeev Suraski 2003-02-18 17:18:28 +00:00
parent d4e9d48b18
commit 955636af69
6 changed files with 14 additions and 14 deletions

View 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;

View 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);
}
/*

View 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;

View 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) {

View 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);

View 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;