Changeset 167
- Timestamp:
- 02/20/06 14:50:37 (3 years ago)
- Files:
-
- eaccelerator/trunk/ChangeLog (modified) (1 diff)
- eaccelerator/trunk/ea_restore.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
eaccelerator/trunk/ChangeLog
r166 r167 3 3 * Fixed static_members handling for php-5.0. Broke this while 4 4 working on PHP-5.1 support. Lost in ifdef statements ;) 5 * Fixed ZE1 (<=PHP4) problem regarding parent class lookup during restore. 6 Parent classname wasn't lowercased before lookup in class_table. This 7 also fixes bug #1432758 (can't restore parent class "stdClass" of class xyz) 5 8 6 9 2006-02-19 Hans Rakers <hans at parse dot nl> eaccelerator/trunk/ea_restore.c
r165 r167 721 721 ea_debug_printf(EA_DEBUG, "restore_class_parent: restoring parent class %s of class %s\n", (char *) parent, to->name); 722 722 #ifdef ZEND_ENGINE_2 723 /* char *name_lc = zend_str_tolower_dup(parent, len);724 if (zend_hash_find(CG(class_table), (void *) name_lc, len + 1, (void **) &to->parent) != SUCCESS)*/725 723 zend_class_entry** parent_ptr = NULL; 726 724 if (zend_lookup_class(parent, len, &parent_ptr TSRMLS_CC) != SUCCESS) 727 725 #else 728 if (zend_hash_find(CG(class_table), (void *) parent, len + 1, (void **) &to->parent) != SUCCESS) 726 ea_debug_hash_display(CG(class_table)); 727 char *name_lc = estrndup(parent, len); 728 zend_str_tolower(name_lc, len); 729 if (zend_hash_find(CG(class_table), (void *) name_lc, len + 1, (void **) &to->parent) != SUCCESS) 729 730 #endif 730 731 { … … 733 734 to->parent = NULL; 734 735 } else { 735 #ifdef ZEND_ENGINE_2 736 /* inherit parent methods */ 736 /* parent found */ 737 #ifdef ZEND_ENGINE_2 737 738 to->parent = *parent_ptr; 739 to->constructor = to->parent->constructor; 740 to->destructor = to->parent->destructor; 741 to->clone = to->parent->clone; 742 #endif 738 743 to->parent->refcount++; 739 744 ea_debug_printf(EA_DEBUG, "restore_class_parent: found parent %s..\n", to->parent->name); 740 745 ea_debug_printf(EA_DEBUG, "restore_class_parent: parent type=%d child type=%d\n", to->parent->type, to->type); 741 to->constructor = to->parent->constructor; 742 to->destructor = to->parent->destructor; 743 to->clone = to->parent->clone; 744 /* to->__get = to->parent->__get; 745 to->__set = to->parent->__set; 746 # ifdef ZEND_ENGINE_2_1 747 to->__unset = to->parent->__unset; 748 to->__isset = to->parent->__isset; 749 to->serialize_func = to->parent->serialize_func; 750 to->unserialize_func = to->parent->unserialize_func; 751 # endif 752 to->__call = to->parent->__call; 753 to->create_object = to->parent->create_object; 754 #else 755 to->handle_property_get = to->parent->handle_property_get; 756 to->handle_property_set = to->parent->handle_property_set; 757 to->handle_function_call = to->parent->handle_function_call;*/ 758 #endif 759 } 760 #ifdef ZEND_ENGINE_2 761 /*efree(name_lc);*/ 746 } 747 #ifndef ZEND_ENGINE_2 748 efree(name_lc); 762 749 #endif 763 750 }