Browse Source

- Add some initializations

experimental/ZendEngine2
Andi Gutmans 24 years ago
parent
commit
2eccd95ca4
  1. 1
      Zend/zend.c
  2. 2
      Zend/zend_API.h
  3. 2
      Zend/zend_compile.c

1
Zend/zend.c

@ -252,6 +252,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.function_table, 0, NULL, ZEND_FUNCTION_DTOR, 1, 0);
zend_standard_class_def.constructor = NULL;
zend_standard_class_def.handle_function_call = NULL;
zend_standard_class_def.handle_property_get = NULL;
zend_standard_class_def.handle_property_set = NULL;

2
Zend/zend_API.h

@ -87,6 +87,7 @@
class_container.name = strdup(class_name); \
class_container.name_length = sizeof(class_name)-1; \
class_container.builtin_functions = functions; \
class_container.constructor = NULL; \
class_container.handle_function_call = NULL; \
class_container.handle_property_get = NULL; \
class_container.handle_property_set = NULL; \
@ -97,6 +98,7 @@
class_container.name = strdup(class_name); \
class_container.name_length = sizeof(class_name)-1; \
class_container.builtin_functions = functions; \
class_container.constructor = NULL; \
class_container.handle_function_call = handle_fcall; \
class_container.handle_property_get = handle_propget; \
class_container.handle_property_set = handle_propset; \

2
Zend/zend_compile.c

@ -1683,6 +1683,8 @@ 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);
new_class_entry.constructor = NULL;
new_class_entry.handle_function_call = NULL;
new_class_entry.handle_property_set = NULL;
new_class_entry.handle_property_get = NULL;

Loading…
Cancel
Save