Changeset 147
- Timestamp:
- 01/16/06 19:03:41 (3 years ago)
- Files:
-
- eaccelerator/branches/PHP_5_1/ChangeLog (modified) (1 diff)
- eaccelerator/branches/PHP_5_1/ea_restore.c (modified) (7 diffs)
- eaccelerator/branches/PHP_5_1/ea_store.c (modified) (1 diff)
- eaccelerator/branches/PHP_5_1/eaccelerator.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
eaccelerator/branches/PHP_5_1/ChangeLog
r146 r147 1 2006-01-16 Hans Rakers <hans at parse dot nl> 2 3 * PHP_5_1: Fix for bug #1401474 (and most likely some more php-5.1 related trouble) 4 static_members handling was incorrect. 5 1 6 2006-01-12 Hans Rakers <hans at parse dot nl> 2 7 eaccelerator/branches/PHP_5_1/ea_restore.c
r146 r147 74 74 zend_hash_destroy(&dummy_class_entry.default_properties); 75 75 zend_hash_destroy(&dummy_class_entry.function_table); 76 #ifdef ZEND_ENGINE_277 76 zend_hash_destroy(&dummy_class_entry.constants_table); 78 77 zend_hash_destroy(&dummy_class_entry.properties_info); 79 #endif 80 #if defined(ZEND_ENGINE_2) && !defined(ZEND_ENGINE_2_1) 78 # ifdef ZEND_ENGINE_2_1 79 zend_hash_destroy(&dummy_class_entry.default_static_members); 80 # endif 81 # if defined(ZEND_ENGINE_2) && !defined(ZEND_ENGINE_2_1) 81 82 zend_hash_destroy(dummy_class_entry.static_members); 82 83 FREE_HASHTABLE(dummy_class_entry.static_members); 83 #endif 84 #ifdef ZEND_ENGINE_2_1 85 zend_hash_destroy(&dummy_class_entry.default_static_members); 86 #endif 87 84 # endif 88 85 return property_dtor; 89 86 } … … 283 280 fixup_zval_hash(from->static_members); 284 281 } 282 # ifdef ZEND_ENGINE_2_1 283 fixup_zval_hash(&from->default_static_members); 284 # endif 285 285 #else 286 286 fixup_zval_hash(&from->default_properties); … … 711 711 to->__unset = to->parent->__unset; 712 712 to->__isset = to->parent->__isset; 713 to->serialize_func = to->parent->serialize_func; 714 to->unserialize_func = to->parent->unserialize_func; 713 715 # endif 714 716 to->__call = to->parent->__call; … … 794 796 795 797 ea_debug_pad(EA_DEBUG TSRMLS_CC); 796 ea_debug_printf(EA_DEBUG, "[%d] re tore_class_entry: %s\n", getpid(), from->name ? from->name : "(top)");798 ea_debug_printf(EA_DEBUG, "[%d] restore_class_entry: %s\n", getpid(), from->name ? from->name : "(top)"); 797 799 #ifdef DEBUG 798 800 EAG(xpad)++; 799 801 #endif 800 801 802 if (to == NULL) { 802 803 to = emalloc(sizeof(zend_class_entry)); … … 812 813 #ifdef ZEND_ENGINE_2 813 814 to->ce_flags = from->ce_flags; 814 /*815 to->static_members = NULL;816 */817 815 to->num_interfaces = from->num_interfaces; 818 816 if (to->num_interfaces > 0) { … … 825 823 826 824 to->iterator_funcs = from->iterator_funcs; 825 to->create_object = from->create_object; 827 826 to->get_iterator = from->get_iterator; 828 827 to->interface_gets_implemented = from->interface_gets_implemented; … … 873 872 to->properties_info.pDestructor = properties_info_dtor; 874 873 875 # ifdef ZEND_ENGINE_2_1874 # ifdef ZEND_ENGINE_2_1 876 875 /* restore default_static_members */ 877 876 restore_zval_hash(&to->default_static_members, &from->default_static_members); 878 877 to->default_static_members.pDestructor = ZVAL_PTR_DTOR; 879 #endif880 878 879 to->static_members = (from->type == ZEND_INTERNAL_CLASS) ? NULL : &to->default_static_members; 880 # else 881 881 if (from->static_members != NULL) { 882 882 ALLOC_HASHTABLE(to->static_members); 883 883 restore_zval_hash(to->static_members, from->static_members); 884 884 to->static_members->pDestructor = ZVAL_PTR_DTOR; 885 /* 886 } else { 887 ALLOC_HASHTABLE(to->static_members); 888 zend_hash_init_ex(to->static_members, 0, NULL, ZVAL_PTR_DTOR, 0, 0); 889 */ 890 } 885 } 886 # endif 891 887 #else 892 888 to->refcount = emalloc(sizeof(*to->refcount)); eaccelerator/branches/PHP_5_1/ea_store.c
r146 r147 820 820 821 821 #ifdef ZEND_ENGINE_2_1 822 store_zval_hash(&to->default_static_members, &from->default_static_members); //LYLE 823 #endif 824 822 store_zval_hash(&to->default_static_members, &from->default_static_members); 823 #endif 825 824 store_hash(&to->function_table, &from->function_table, (store_bucket_t) store_op_array); 826 825 eaccelerator/branches/PHP_5_1/eaccelerator.h
r146 r147 229 229 char *name; 230 230 char *name_lc; 231 uint name_length;231 zend_uint name_length; 232 232 char *parent; 233 233 HashTable function_table; 234 234 HashTable default_properties; 235 #ifdef ZEND_ENGINE_2_1 235 #ifdef ZEND_ENGINE_2 236 HashTable properties_info; 237 # ifdef ZEND_ENGINE_2_1 236 238 HashTable default_static_members; 237 #endif 238 #ifdef ZEND_ENGINE_2 239 # endif 240 HashTable *static_members; 241 HashTable constants_table; 239 242 zend_uint ce_flags; 240 HashTable *static_members;241 HashTable properties_info;242 HashTable constants_table;243 243 zend_uint num_interfaces; 244 244 … … 246 246 zend_class_iterator_funcs iterator_funcs; 247 247 248 zend_object_value (*create_object) (zend_class_entry * 249 class_type TSRMLS_DC); 250 zend_object_iterator *(*get_iterator) (zend_class_entry * ce, 251 zval * object TSRMLS_DC); 252 int (*interface_gets_implemented) (zend_class_entry * iface, zend_class_entry * class_type TSRMLS_DC); /* a class implements this interface */ 248 /* handlers */ 249 zend_object_value (*create_object) (zend_class_entry *class_type TSRMLS_DC); 250 zend_object_iterator *(*get_iterator) (zend_class_entry *ce, zval *object TSRMLS_DC); 251 int (*interface_gets_implemented) (zend_class_entry *iface, zend_class_entry *class_type TSRMLS_DC); /* a class implements this interface */ 252 253 /* hra: serializer callbacks may need to be added here in the future for php 5.1 */ 253 254 254 255 char *filename;