diff options
| author | Andi Gutmans <andi@php.net> | 2002-01-25 12:55:03 +0000 |
|---|---|---|
| committer | Andi Gutmans <andi@php.net> | 2002-01-25 12:55:03 +0000 |
| commit | 7309a6ed21b85771e478d0513dc13dfadceeae16 (patch) | |
| tree | 19e8d6de785d10b7b820005964cce05e5f4b592a /Zend/zend_compile.c | |
| parent | 96a9eba020f956e605d52a2a99e3975c7e9ae0da (diff) | |
| download | php-git-7309a6ed21b85771e478d0513dc13dfadceeae16.tar.gz | |
- First destructor hell fix. There was a situation where an object's
- destructor could be run after its class was already dead. Right now
- object destructors is the first thing whic happens during shutdown in
- order to prevent this problem. It's very likely that destructors will
- cause more grief and we'll have to outline exactly when you should use
- them and what kind of logic you're allowed to do inside of them.
- This bug was reported by sebastian.
Diffstat (limited to 'Zend/zend_compile.c')
| -rw-r--r-- | Zend/zend_compile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 2a02ac60f6..0132bb9ab0 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -1365,7 +1365,7 @@ static void create_class(HashTable *class_table, char *name, int name_length, ze zend_hash_init(&new_class_entry.function_table, 10, NULL, ZEND_FUNCTION_DTOR, 0); 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.static_members = (HashTable *) emalloc(sizeof(HashTable)); + ALLOC_HASHTABLE(new_class_entry.static_members); zend_hash_init(new_class_entry.static_members, 10, NULL, ZVAL_PTR_DTOR, 0); zend_hash_init(&new_class_entry.constants_table, 10, NULL, ZVAL_PTR_DTOR, 0); @@ -1854,7 +1854,7 @@ void zend_do_begin_class_declaration(znode *class_token, znode *class_name, znod zend_hash_init(&new_class_entry.function_table, 10, NULL, ZEND_FUNCTION_DTOR, 0); 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.static_members = (HashTable *) emalloc(sizeof(HashTable)); + ALLOC_HASHTABLE(new_class_entry.static_members); zend_hash_init(new_class_entry.static_members, 10, NULL, ZVAL_PTR_DTOR, 0); zend_hash_init(&new_class_entry.constants_table, 10, NULL, ZVAL_PTR_DTOR, 0); |
