]> granicus.if.org Git - php/commitdiff
- Rename zend_class_entry.constants -> zend_class_entry.constants_table
authorAndi Gutmans <andi@php.net>
Tue, 11 Dec 2001 18:46:43 +0000 (18:46 +0000)
committerAndi Gutmans <andi@php.net>
Tue, 11 Dec 2001 18:46:43 +0000 (18:46 +0000)
Zend/zend.c
Zend/zend.h
Zend/zend_API.c
Zend/zend_compile.c
Zend/zend_execute.c
Zend/zend_execute_API.c
Zend/zend_opcode.c

index 56ac51e6a0e81f29b77a520c9e40d01e4010db2f..d075cce732e59115484252b55e0d59ce4448fb14 100644 (file)
@@ -249,7 +249,7 @@ static void register_standard_class(void)
        zend_standard_class_def.parent = NULL;
        zend_hash_init_ex(&zend_standard_class_def.default_properties, 0, NULL, ZVAL_PTR_DTOR, 1, 0);
        zend_hash_init_ex(&zend_standard_class_def.static_members, 0, NULL, ZVAL_PTR_DTOR, 1, 0);
-       zend_hash_init_ex(&zend_standard_class_def.constants, 0, NULL, ZVAL_PTR_DTOR, 1, 0);
+       zend_hash_init_ex(&zend_standard_class_def.constants_table, 0, NULL, ZVAL_PTR_DTOR, 1, 0);
        zend_hash_init_ex(&zend_standard_class_def.class_table, 10, NULL, ZEND_CLASS_DTOR, 1, 0);
        zend_hash_init_ex(&zend_standard_class_def.function_table, 0, NULL, ZEND_FUNCTION_DTOR, 1, 0);
        zend_standard_class_def.constructor = NULL;
index 37783dc26e8283d2f94d689c238df2b916eccaf9..b40eb67faf9e65d9ed92eeeb8f3729d20e925b34 100644 (file)
@@ -298,7 +298,7 @@ struct _zend_class_entry {
        HashTable default_properties;
        HashTable class_table;
        HashTable static_members;
-       HashTable constants;
+       HashTable constants_table;
        zend_function_entry *builtin_functions;
 
        union _zend_function *constructor;
index 53a990fc89a14d112ea1511394b73ab1d24b20ca..2e433d68c5a54c1ca3f127aca79e86787fe79a36 100644 (file)
@@ -1218,7 +1218,7 @@ ZEND_API zend_class_entry *zend_register_internal_class(zend_class_entry *class_
        class_entry->is_namespace = 0;
        zend_hash_init(&class_entry->default_properties, 0, NULL, ZVAL_PTR_DTOR, 1);
        zend_hash_init(&class_entry->static_members, 0, NULL, ZVAL_PTR_DTOR, 1);
-       zend_hash_init(&class_entry->constants, 0, NULL, ZVAL_PTR_DTOR, 1);
+       zend_hash_init(&class_entry->constants_table, 0, NULL, ZVAL_PTR_DTOR, 1);
        zend_hash_init(&class_entry->function_table, 0, NULL, ZEND_FUNCTION_DTOR, 1);
        zend_hash_init(&class_entry->class_table, 10, NULL, ZEND_CLASS_DTOR, 1);
 
index 8ac58e49fc393077806e742d9dbc9b852f0b8334..2e348116b038c1dd097ba9d1a906c811a994eb95 100644 (file)
@@ -1281,7 +1281,7 @@ void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce)
        zend_hash_merge(&ce->default_properties, &parent_ce->default_properties, (void (*)(void *)) zval_add_ref, (void *) &tmp, sizeof(zval *), 0);
        /* STATIC_MEMBERS_FIXME */
        zend_hash_merge(&ce->static_members, &parent_ce->static_members, (void (*)(void *)) zval_add_ref, (void *) &tmp, sizeof(zval *), 0);
-       zend_hash_merge(&ce->constants, &parent_ce->constants, (void (*)(void *)) zval_add_ref, (void *) &tmp, sizeof(zval *), 0);
+       zend_hash_merge(&ce->constants_table, &parent_ce->constants_table, (void (*)(void *)) zval_add_ref, (void *) &tmp, sizeof(zval *), 0);
        zend_hash_merge(&ce->function_table, &parent_ce->function_table, (void (*)(void *)) function_add_ref, &tmp_zend_function, sizeof(zend_function), 0);
        ce->parent = parent_ce;
        if (!ce->handle_property_get)
@@ -1389,7 +1389,7 @@ ZEND_API int do_bind_function_or_class(zend_op *opline, HashTable *function_tabl
                                        zend_hash_destroy(&ce->function_table);
                                        zend_hash_destroy(&ce->default_properties);
                                        zend_hash_destroy(&ce->static_members);
-                                       zend_hash_destroy(&ce->constants);
+                                       zend_hash_destroy(&ce->constants_table);
                                        return FAILURE;
                                }
                                return SUCCESS;
@@ -1723,7 +1723,7 @@ void zend_do_begin_class_declaration(znode *class_token, znode *class_name, znod
        zend_hash_init(&new_class_entry.class_table, 10, NULL, ZEND_CLASS_DTOR, 0);
        zend_hash_init(&new_class_entry.default_properties, 10, NULL, ZVAL_PTR_DTOR, 0);
        zend_hash_init(&new_class_entry.static_members, 10, NULL, ZVAL_PTR_DTOR, 0);
-       zend_hash_init(&new_class_entry.constants, 10, NULL, ZVAL_PTR_DTOR, 0);
+       zend_hash_init(&new_class_entry.constants_table, 10, NULL, ZVAL_PTR_DTOR, 0);
 
        new_class_entry.constructor = NULL;
 
@@ -1752,7 +1752,7 @@ void zend_do_begin_class_declaration(znode *class_token, znode *class_name, znod
                        zend_hash_copy(&new_class_entry.static_members, &parent_class->static_members, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
 
                        /* copy constants */
-                       zend_hash_copy(&new_class_entry.constants, &parent_class->constants, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
+                       zend_hash_copy(&new_class_entry.constants_table, &parent_class->constants_table, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
 
                        new_class_entry.constructor = parent_class->constructor;
 
@@ -1839,7 +1839,7 @@ void zend_do_declare_property(znode *var_name, znode *value, int declaration_typ
                                zend_hash_update(&CG(active_class_entry)->static_members, var_name->u.constant.value.str.val, var_name->u.constant.value.str.len+1, &property, sizeof(zval *), NULL);
                                break;
                        case T_CONST:
-                               zend_hash_update(&CG(active_class_entry)->constants, var_name->u.constant.value.str.val, var_name->u.constant.value.str.len+1, &property, sizeof(zval *), NULL);
+                               zend_hash_update(&CG(active_class_entry)->constants_table, var_name->u.constant.value.str.val, var_name->u.constant.value.str.len+1, &property, sizeof(zval *), NULL);
                                break;
                }
        }
index 5e53d005b3d01a35613e233b538f16a297749cfd..68176524cce927785c32d3860eef7678d96f55af 100644 (file)
@@ -2076,7 +2076,7 @@ send_by_ref:
                                        if (EX(opline)->op1.op_type == IS_UNUSED) {
                                                if (EG(namespace)) {
                                                        ce = EG(namespace);
-                                                       if (zend_hash_find(&ce->constants, EX(opline)->op2.u.constant.value.str.val, EX(opline)->op2.u.constant.value.str.len+1, (void **) &value) == SUCCESS) {
+                                                       if (zend_hash_find(&ce->constants_table, EX(opline)->op2.u.constant.value.str.val, EX(opline)->op2.u.constant.value.str.len+1, (void **) &value) == SUCCESS) {
                                                                zval_update_constant(value, (void *) 1 TSRMLS_CC);
                                                                EX(Ts)[EX(opline)->result.u.var].tmp_var = **value;
                                                                zval_copy_ctor(&EX(Ts)[EX(opline)->result.u.var].tmp_var);
@@ -2095,7 +2095,7 @@ send_by_ref:
                                        
                                        ce = EX(Ts)[EX(opline)->op1.u.var].EA.class_entry;
                                        
-                                       if (zend_hash_find(&ce->constants, EX(opline)->op2.u.constant.value.str.val, EX(opline)->op2.u.constant.value.str.len+1, (void **) &value) == SUCCESS) {
+                                       if (zend_hash_find(&ce->constants_table, EX(opline)->op2.u.constant.value.str.val, EX(opline)->op2.u.constant.value.str.len+1, (void **) &value) == SUCCESS) {
                                                zval_update_constant(value, (void *) 1 TSRMLS_CC);
                                                EX(Ts)[EX(opline)->result.u.var].tmp_var = **value;
                                                zval_copy_ctor(&EX(Ts)[EX(opline)->result.u.var].tmp_var);
index ea9c3dee4ac95956bc03461e51369eb54796d7f1..a9ea4469a71c5d2ea49a0f9f20c8ca9d6a38fb57 100644 (file)
@@ -328,7 +328,7 @@ ZEND_API int zval_update_constant(zval **pp, void *arg TSRMLS_DC)
                                }
                                last = cur;
                        }
-                       if (zend_hash_find(&ce->constants, last, strlen(last)+1, (void **) &value) == FAILURE) {
+                       if (zend_hash_find(&ce->constants_table, last, strlen(last)+1, (void **) &value) == FAILURE) {
                                zend_error(E_ERROR, "Invalid class! Improve this error message");
                        }
                        const_value = **value;
index 788d35912589ea53b6ab48c19ec63f26c9a4f158..edefcafa02bb058de0d3990defe644a47310598f 100644 (file)
@@ -118,7 +118,7 @@ ZEND_API void destroy_zend_class(zend_class_entry *ce)
                        zend_hash_destroy(&ce->function_table);
                        zend_hash_destroy(&ce->default_properties);
                        zend_hash_destroy(&ce->static_members);
-                       zend_hash_destroy(&ce->constants);
+                       zend_hash_destroy(&ce->constants_table);
                        zend_hash_destroy(&ce->class_table);
                        break;
                case ZEND_INTERNAL_CLASS:
@@ -127,7 +127,7 @@ ZEND_API void destroy_zend_class(zend_class_entry *ce)
                        zend_hash_destroy(&ce->function_table);
                        zend_hash_destroy(&ce->default_properties);
                        zend_hash_destroy(&ce->static_members);
-                       zend_hash_destroy(&ce->constants);
+                       zend_hash_destroy(&ce->constants_table);
                        zend_hash_destroy(&ce->class_table);
                        break;
        }