diff options
author | Andrei Zmievski <andrei@php.net> | 1999-12-21 17:14:31 +0000 |
---|---|---|
committer | Andrei Zmievski <andrei@php.net> | 1999-12-21 17:14:31 +0000 |
commit | 80bab9d9394939c43e61300621aa7c72ab901ef7 (patch) | |
tree | 39fd30c7003962471e74271389d3353e6972dd8c /Zend | |
parent | ff7a79c6cfe6389510826eeda01732c8a5cda428 (diff) | |
download | php-git-80bab9d9394939c43e61300621aa7c72ab901ef7.tar.gz |
We're using ZVAL's now.
Diffstat (limited to 'Zend')
-rw-r--r-- | Zend/zend.c | 10 | ||||
-rw-r--r-- | Zend/zend_API.c | 6 | ||||
-rw-r--r-- | Zend/zend_compile.c | 4 | ||||
-rw-r--r-- | Zend/zend_execute.c | 4 | ||||
-rw-r--r-- | Zend/zend_execute_API.c | 4 | ||||
-rw-r--r-- | Zend/zend_operators.c | 4 | ||||
-rw-r--r-- | Zend/zend_variables.c | 4 | ||||
-rw-r--r-- | Zend/zend_variables.h | 6 |
8 files changed, 21 insertions, 21 deletions
diff --git a/Zend/zend.c b/Zend/zend.c index 4733e22c9c..12b6afdd7b 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -68,7 +68,7 @@ static uint zend_version_info_length; #define ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski\n" -#define PRINT_PVAL_INDENT 4 +#define PRINT_ZVAL_INDENT 4 static void print_hash(HashTable *ht, int indent) { @@ -81,7 +81,7 @@ static void print_hash(HashTable *ht, int indent) ZEND_PUTS(" "); } ZEND_PUTS("(\n"); - indent += PRINT_PVAL_INDENT; + indent += PRINT_ZVAL_INDENT; zend_hash_internal_pointer_reset(ht); while (zend_hash_get_current_data(ht, (void **) &tmp) == SUCCESS) { for (i=0; i<indent; i++) { @@ -98,11 +98,11 @@ static void print_hash(HashTable *ht, int indent) break; } ZEND_PUTS("] => "); - zend_print_zval_r(*tmp, indent+PRINT_PVAL_INDENT); + zend_print_zval_r(*tmp, indent+PRINT_ZVAL_INDENT); ZEND_PUTS("\n"); zend_hash_move_forward(ht); } - indent -= PRINT_PVAL_INDENT; + indent -= PRINT_ZVAL_INDENT; for (i=0; i<indent; i++) { ZEND_PUTS(" "); } @@ -225,7 +225,7 @@ static void register_standard_class(void) zend_standard_class_def.name_length = sizeof("stdClass") - 1; zend_standard_class_def.name = zend_strndup("stdClass", zend_standard_class_def.name_length); zend_standard_class_def.parent = NULL; - zend_hash_init(&zend_standard_class_def.default_properties, 0, NULL, PVAL_PTR_DTOR, 1); + zend_hash_init(&zend_standard_class_def.default_properties, 0, NULL, ZVAL_PTR_DTOR, 1); zend_hash_init(&zend_standard_class_def.function_table, 0, NULL, ZEND_FUNCTION_DTOR, 1); zend_standard_class_def.handle_function_call = NULL; zend_standard_class_def.handle_property_get = NULL; diff --git a/Zend/zend_API.c b/Zend/zend_API.c index f0efa2baed..e0d51cf554 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -189,7 +189,7 @@ ZEND_API void wrong_param_count() ZEND_API inline int array_init(zval *arg) { arg->value.ht = (HashTable *) emalloc(sizeof(HashTable)); - if (!arg->value.ht || zend_hash_init(arg->value.ht, 0, NULL, PVAL_PTR_DTOR, 0)) { + if (!arg->value.ht || zend_hash_init(arg->value.ht, 0, NULL, ZVAL_PTR_DTOR, 0)) { zend_error(E_CORE_ERROR, "Cannot allocate memory for array"); return FAILURE; } @@ -207,7 +207,7 @@ ZEND_API inline int object_init_ex(zval *arg, zend_class_entry *class_type) class_type->constants_updated = 1; } arg->value.obj.properties = (HashTable *) emalloc(sizeof(HashTable)); - zend_hash_init(arg->value.obj.properties, 0, NULL, PVAL_PTR_DTOR, 0); + zend_hash_init(arg->value.obj.properties, 0, NULL, ZVAL_PTR_DTOR, 0); zend_hash_copy(arg->value.obj.properties, &class_type->default_properties, (void (*)(void *)) zval_add_ref, (void *) &tmp, sizeof(zval *)); arg->type = IS_OBJECT; arg->value.obj.ce = class_type; @@ -812,7 +812,7 @@ ZEND_API zend_class_entry *register_internal_class(zend_class_entry *class_entry class_entry->refcount = (int *) malloc(sizeof(int)); *class_entry->refcount = 1; class_entry->constants_updated = 0; - zend_hash_init(&class_entry->default_properties, 0, NULL, PVAL_PTR_DTOR, 1); + zend_hash_init(&class_entry->default_properties, 0, NULL, ZVAL_PTR_DTOR, 1); zend_hash_init(&class_entry->function_table, 0, NULL, ZEND_FUNCTION_DTOR, 1); zend_hash_update(CG(class_table), lowercase_name, class_entry->name_length+1, class_entry, sizeof(zend_class_entry), (void **) ®ister_class); diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 9d592d47bc..dbc413b15d 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -1419,7 +1419,7 @@ void do_begin_class_declaration(znode *class_name, znode *parent_class_name CLS_ zend_str_tolower(CG(class_entry).name, CG(class_entry).name_length); zend_hash_init(&CG(class_entry).function_table, 10, NULL, ZEND_FUNCTION_DTOR, 0); - zend_hash_init(&CG(class_entry).default_properties, 10, NULL, PVAL_PTR_DTOR, 0); + zend_hash_init(&CG(class_entry).default_properties, 10, NULL, ZVAL_PTR_DTOR, 0); /* code for inheritance from parent class */ if (parent_class_name) { @@ -1807,7 +1807,7 @@ void do_fetch_global_or_static_variable(znode *varname, znode *static_assignment *tmp = static_assignment->u.constant; if (!CG(active_op_array)->static_variables) { CG(active_op_array)->static_variables = (HashTable *) emalloc(sizeof(HashTable)); - zend_hash_init(CG(active_op_array)->static_variables, 2, NULL, PVAL_PTR_DTOR, 0); + zend_hash_init(CG(active_op_array)->static_variables, 2, NULL, ZVAL_PTR_DTOR, 0); } zend_hash_update_ptr(CG(active_op_array)->static_variables, varname->u.constant.value.str.val, varname->u.constant.value.str.len+1, tmp, sizeof(zval *), NULL); } diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index be6fd00406..6b3a1aab0a 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -460,7 +460,7 @@ static inline void zend_fetch_var_address(znode *result, znode *op1, znode *op2, case ZEND_FETCH_STATIC: if (!EG(active_op_array)->static_variables) { EG(active_op_array)->static_variables = (HashTable *) emalloc(sizeof(HashTable)); - zend_hash_init(EG(active_op_array)->static_variables, 2, NULL, PVAL_PTR_DTOR, 0); + zend_hash_init(EG(active_op_array)->static_variables, 2, NULL, ZVAL_PTR_DTOR, 0); } target_symbol_table = EG(active_op_array)->static_variables; break; @@ -1502,7 +1502,7 @@ do_fcall_common: function_state.function_symbol_table = *(EG(symtable_cache_ptr)--); } else { function_state.function_symbol_table = (HashTable *) emalloc(sizeof(HashTable)); - zend_hash_init(function_state.function_symbol_table, 0, NULL, PVAL_PTR_DTOR, 0); + zend_hash_init(function_state.function_symbol_table, 0, NULL, ZVAL_PTR_DTOR, 0); /*printf("Cache miss! Initialized %x\n", function_state.function_symbol_table);*/ } calling_symbol_table = EG(active_symbol_table); diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 6325b57f2d..116a776fba 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -105,7 +105,7 @@ void init_executor(CLS_D ELS_DC) zend_ptr_stack_init(&EG(argument_stack)); EG(main_op_array) = NULL; - zend_hash_init(&EG(symbol_table), 50, NULL, PVAL_PTR_DTOR, 0); + zend_hash_init(&EG(symbol_table), 50, NULL, ZVAL_PTR_DTOR, 0); EG(active_symbol_table) = &EG(symbol_table); zend_llist_apply(&zend_extensions, (void (*)(void *)) zend_extension_activator); @@ -371,7 +371,7 @@ int call_user_function_ex(HashTable *function_table, zval *object, zval *functio if (function_state.function->type == ZEND_USER_FUNCTION) { calling_symbol_table = EG(active_symbol_table); EG(active_symbol_table) = (HashTable *) emalloc(sizeof(HashTable)); - zend_hash_init(EG(active_symbol_table), 0, NULL, PVAL_PTR_DTOR, 0); + zend_hash_init(EG(active_symbol_table), 0, NULL, ZVAL_PTR_DTOR, 0); if (object) { zval *dummy = (zval *) emalloc(sizeof(zval)), **this_ptr; diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 4368028bb4..ed4be2cc0b 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -347,13 +347,13 @@ static void convert_scalar_to_array(zval *op, int type) switch (type) { case IS_ARRAY: op->value.ht = (HashTable *) emalloc(sizeof(HashTable)); - zend_hash_init(op->value.ht, 0, NULL, PVAL_PTR_DTOR, 0); + zend_hash_init(op->value.ht, 0, NULL, ZVAL_PTR_DTOR, 0); zend_hash_index_update(op->value.ht, 0, (void *) &entry, sizeof(zval *), NULL); op->type = IS_ARRAY; break; case IS_OBJECT: op->value.obj.properties = (HashTable *) emalloc(sizeof(HashTable)); - zend_hash_init(op->value.obj.properties, 0, NULL, PVAL_PTR_DTOR, 0); + zend_hash_init(op->value.obj.properties, 0, NULL, ZVAL_PTR_DTOR, 0); zend_hash_update(op->value.obj.properties, "scalar", sizeof("scalar"), (void *) &entry, sizeof(zval *), NULL); op->value.obj.ce = &zend_standard_class_def; op->type = IS_OBJECT; diff --git a/Zend/zend_variables.c b/Zend/zend_variables.c index 6d5452c94e..72416146b0 100644 --- a/Zend/zend_variables.c +++ b/Zend/zend_variables.c @@ -139,7 +139,7 @@ ZEND_API int _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC) return SUCCESS; /* do nothing */ } zvalue->value.ht = (HashTable *) emalloc_rel(sizeof(HashTable)); - zend_hash_init(zvalue->value.ht, 0, NULL, PVAL_PTR_DTOR, 0); + zend_hash_init(zvalue->value.ht, 0, NULL, ZVAL_PTR_DTOR, 0); zend_hash_copy(zvalue->value.ht, original_ht, (void (*)(void *)) zval_add_ref, (void *) &tmp, sizeof(zval *)); } break; @@ -148,7 +148,7 @@ ZEND_API int _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC) HashTable *original_ht = zvalue->value.obj.properties; zvalue->value.obj.properties = (HashTable *) emalloc_rel(sizeof(HashTable)); - zend_hash_init(zvalue->value.obj.properties, 0, NULL, PVAL_PTR_DTOR, 0); + zend_hash_init(zvalue->value.obj.properties, 0, NULL, ZVAL_PTR_DTOR, 0); zend_hash_copy(zvalue->value.obj.properties, original_ht, (void (*)(void *)) zval_add_ref, (void *) &tmp, sizeof(zval *)); } break; diff --git a/Zend/zend_variables.h b/Zend/zend_variables.h index ce1d7f06d5..312939c582 100644 --- a/Zend/zend_variables.h +++ b/Zend/zend_variables.h @@ -51,9 +51,9 @@ END_EXTERN_C() void zval_add_ref(zval **p); void zval_del_ref(zval **p); -#define PVAL_DESTRUCTOR (int (*)(void *)) zval_dtor_wrapper -#define PVAL_PTR_DTOR (int (*)(void *)) zval_ptr_dtor_wrapper -#define PVAL_COPY_CTOR (void (*)(void *)) zval_copy_ctor_wrapper +#define ZVAL_DESTRUCTOR (int (*)(void *)) zval_dtor_wrapper +#define ZVAL_PTR_DTOR (int (*)(void *)) zval_ptr_dtor_wrapper +#define ZVAL_COPY_CTOR (void (*)(void *)) zval_copy_ctor_wrapper ZEND_API void var_reset(zval *var); ZEND_API void var_uninit(zval *var); |