Changeset 199
- Timestamp:
- 09/24/2006 10:33:31 AM (5 years ago)
- Location:
- trunk/processor
- Files:
-
- 2 modified
-
head.m4 (modified) (2 diffs)
-
processor.m4 (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/processor/head.m4
r196 r199 249 249 static int xc_hash_static_member_check(xc_processor_t *processor, Bucket *b TSRMLS_DC) /* {{{ */ 250 250 { 251 zend_class_entry *src = processor->active_class_entry_src;251 const zend_class_entry *src = processor->active_class_entry_src; 252 252 if (src->parent) { 253 253 zval **srczv; … … 265 265 static void inherit_static_prop(zval **p) /* {{{ */ 266 266 { 267 /* already set */ 268 #if 0 267 269 (*p)->refcount++; 268 270 (*p)->is_ref = 1; 271 #endif 269 272 } 270 273 /* }}} */ 271 274 static void xc_fix_static_members(xc_processor_t *processor, zend_class_entry *dst TSRMLS_DC) /* {{{ */ 272 275 { 273 zend_class_entry *parent_ce = dst->parent; 274 if (parent_ce->type != dst->type) { 275 /* User class extends internal class */ 276 zend_update_class_constants(parent_ce TSRMLS_CC); 277 zend_hash_merge(&dst->default_static_members, CE_STATIC_MEMBERS(parent_ce), (void (*)(void *)) inherit_static_prop, NULL, sizeof(zval *), 0); 278 } 279 else { 280 zend_hash_merge(&dst->default_static_members, &parent_ce->default_static_members, (void (*)(void *)) inherit_static_prop, NULL, sizeof(zval *), 0); 281 } 282 283 /* 284 HashPosition pos; 285 HashTable *pmembers = CE_STATIC_MEMBERS(dst->parent); 286 zval **zv; 287 for (zend_hash_internal_pointer_reset_ex(pmembers, &pos); 288 zend_hash_get_current_data_ex(pmembers, (void **) &zv, &pos) == SUCCESS; 289 zend_hash_move_forward_ex(pmembers, &pos)) { 290 if (zend_hash_quick_find(parent->static_members, p->arKey, p->nKeyLength, p->h, &pprop.ptr) == SUCCESS) { 291 } 292 } 293 */ 276 zend_hash_merge(&dst->default_static_members, &dst->parent->default_static_members, (void (*)(void *)) inherit_static_prop, NULL, sizeof(zval *), 0); 294 277 } 295 278 /* }}} */ -
trunk/processor/processor.m4
r196 r199 265 265 dnl }}} 266 266 DEF_STRUCT_P_FUNC(`zend_class_entry', , `dnl {{{ 267 IFC OPY(`267 IFCALCCOPY(` 268 268 processor->active_class_entry_src = src; 269 processor->active_class_entry_dst = dst;269 IFCOPY(`processor->active_class_entry_dst = dst;') 270 270 ') 271 271 DISPATCH(char, type) … … 298 298 STRUCT(HashTable, properties_info, HashTable_zend_property_info) 299 299 # ifdef ZEND_ENGINE_2_1 300 STRUCT(HashTable, default_static_members, IF STORE(HashTable_zval_ptr_static_member_check, HashTable_zval_ptr))300 STRUCT(HashTable, default_static_members, IFCALCSTORE(HashTable_zval_ptr_static_member_check, HashTable_zval_ptr)) 301 301 IFCOPY(`dst->static_members = &dst->default_static_members;') 302 302 IFRESTORE(`if (dst->parent) xc_fix_static_members(processor, dst TSRMLS_CC);') 303 303 DONE(static_members) 304 304 # else 305 STRUCT_P(HashTable, static_members, IF STORE(HashTable_zval_ptr_static_member_check, HashTable_zval_ptr))305 STRUCT_P(HashTable, static_members, IFCALCSTORE(HashTable_zval_ptr_static_member_check, HashTable_zval_ptr)) 306 306 # endif 307 307 STRUCT(HashTable, constants_table, HashTable_zval_ptr) … … 384 384 STRUCT(HashTable, function_table, HashTable_zend_function) 385 385 IFRESTORE(`dst->function_table.pDestructor = ZEND_FUNCTION_DTOR;') 386 IFC OPY(`386 IFCALCCOPY(` 387 387 processor->active_class_entry_src = NULL; 388 processor->active_class_entry_dst = NULL;388 IFCOPY(`processor->active_class_entry_dst = NULL;') 389 389 ') 390 390 ')

