Changeset 195
- Timestamp:
- 04/06/06 18:49:25 (3 years ago)
- Files:
-
- eaccelerator/trunk/ChangeLog (modified) (1 diff)
- eaccelerator/trunk/ea_restore.c (modified) (1 diff)
- eaccelerator/trunk/ea_store.c (modified) (3 diffs)
- eaccelerator/trunk/eaccelerator.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
eaccelerator/trunk/ChangeLog
r194 r195 1 2006-04-06 Hans Rakers <hans at parse dot nl> 2 3 * Fixed handling of interfaces. This fixes sf.net bug #1440575. 4 This fix also introduces some changes in the cached object structure 5 so remember to empty your disk caches if you have them. This is 6 always a good thing to do after upgrading btw :) 7 1 8 2006-04-06 Hans Rakers <hans at parse dot nl> 2 9 eaccelerator/trunk/ea_restore.c
r180 r195 827 827 to->ce_flags = from->ce_flags; 828 828 to->num_interfaces = from->num_interfaces; 829 to->interfaces = NULL; 830 829 831 if (to->num_interfaces > 0) { 830 832 /* hrak: Allocate the slots which will later be populated by ZEND_ADD_INTERFACE */ 831 833 to->interfaces = (zend_class_entry **) emalloc(sizeof(zend_class_entry *) * to->num_interfaces); 832 834 memset(to->interfaces, 0, sizeof(zend_class_entry *) * to->num_interfaces); 833 } else { 834 to->interfaces = NULL; 835 } 836 837 to->iterator_funcs = from->iterator_funcs; 838 to->create_object = from->create_object; 839 to->get_iterator = from->get_iterator; 840 to->interface_gets_implemented = from->interface_gets_implemented; 835 } 841 836 #endif 842 837 eaccelerator/trunk/ea_store.c
r187 r195 837 837 { 838 838 eaccelerator_class_entry *to; 839 unsigned int i; 840 839 841 EACCELERATOR_ALIGN(EAG(mem)); 840 842 to = (eaccelerator_class_entry *) EAG(mem); … … 847 849 to->ce_flags = from->ce_flags; 848 850 to->static_members = NULL; 849 to->num_interfaces = from->num_interfaces; 850 /* hrak: no need to really store the interfaces since these get populated 851 * at/after restore by zend_do_inheritance and ZEND_ADD_INTERFACE */ 852 to->interfaces = NULL; 851 852 /* 853 * Scan the interfaces looking for the first one which isn't 0 854 * This is the first inherited interface and should not be counted in the stored object 855 */ 856 for (i = 0 ; i < from->num_interfaces ; i++) { 857 if (from->interfaces[i] != 0) { 858 break; 859 } 860 } 861 to->num_interfaces = i; 862 DBG(ea_debug_printf, (EA_DEBUG, "from->num_interfaces=%d, to->num_interfaces=%d\n", from->num_interfaces, to->num_interfaces)); 863 864 /* 865 * hrak: no need to really store the interfaces since these get populated 866 * at/after restore by zend_do_inheritance and ZEND_ADD_INTERFACE 867 */ 853 868 #endif 854 869 … … 870 885 to->line_end = from->line_end; 871 886 to->doc_comment_len = from->doc_comment_len; 872 to->iterator_funcs = from->iterator_funcs;873 to->create_object = from->create_object;874 to->get_iterator = from->get_iterator;875 to->interface_gets_implemented = from->interface_gets_implemented;876 887 877 888 if (from->filename != NULL) eaccelerator/trunk/eaccelerator.h
r191 r195 240 240 zend_uint num_interfaces; 241 241 242 char **interfaces;243 zend_class_iterator_funcs iterator_funcs;244 245 /* handlers */246 zend_object_value (*create_object) (zend_class_entry *class_type TSRMLS_DC);247 zend_object_iterator *(*get_iterator) (zend_class_entry *ce, zval *object TSRMLS_DC);248 int (*interface_gets_implemented) (zend_class_entry *iface, zend_class_entry *class_type TSRMLS_DC); /* a class implements this interface */249 250 /* hra: serializer callbacks may need to be added here in the future for php 5.1 */251 252 242 char *filename; 253 243 zend_uint line_start;