Changeset 199


Ignore:
Timestamp:
2006-09-24T10:33:31+02:00 (8 years ago)
Author:
moo
Message:

processor: remove commented code, fix corruption detected by --eanble-xcache-test for [196]

Location:
trunk/processor
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/processor/head.m4

    r196 r199  
    249249static int xc_hash_static_member_check(xc_processor_t *processor, Bucket *b TSRMLS_DC) /* {{{ */ 
    250250{ 
    251     zend_class_entry *src = processor->active_class_entry_src; 
     251    const zend_class_entry *src = processor->active_class_entry_src; 
    252252    if (src->parent) { 
    253253        zval **srczv; 
     
    265265static void inherit_static_prop(zval **p) /* {{{ */ 
    266266{ 
     267    /* already set */ 
     268#if 0 
    267269    (*p)->refcount++; 
    268270    (*p)->is_ref = 1; 
     271#endif 
    269272} 
    270273/* }}} */ 
    271274static void xc_fix_static_members(xc_processor_t *processor, zend_class_entry *dst TSRMLS_DC) /* {{{ */ 
    272275{ 
    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); 
    294277} 
    295278/* }}} */ 
  • trunk/processor/processor.m4

    r196 r199  
    265265dnl }}} 
    266266DEF_STRUCT_P_FUNC(`zend_class_entry', , `dnl {{{ 
    267     IFCOPY(` 
     267    IFCALCCOPY(` 
    268268        processor->active_class_entry_src = src; 
    269         processor->active_class_entry_dst = dst; 
     269        IFCOPY(`processor->active_class_entry_dst = dst;') 
    270270    ') 
    271271    DISPATCH(char, type) 
     
    298298    STRUCT(HashTable, properties_info, HashTable_zend_property_info) 
    299299#   ifdef ZEND_ENGINE_2_1 
    300     STRUCT(HashTable, default_static_members, IFSTORE(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)) 
    301301    IFCOPY(`dst->static_members = &dst->default_static_members;') 
    302302    IFRESTORE(`if (dst->parent) xc_fix_static_members(processor, dst TSRMLS_CC);') 
    303303    DONE(static_members) 
    304304#   else 
    305     STRUCT_P(HashTable, static_members, IFSTORE(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)) 
    306306#   endif 
    307307    STRUCT(HashTable, constants_table, HashTable_zval_ptr) 
     
    384384    STRUCT(HashTable, function_table, HashTable_zend_function) 
    385385    IFRESTORE(`dst->function_table.pDestructor = ZEND_FUNCTION_DTOR;') 
    386     IFCOPY(` 
     386    IFCALCCOPY(` 
    387387        processor->active_class_entry_src = NULL; 
    388         processor->active_class_entry_dst = NULL; 
     388        IFCOPY(`processor->active_class_entry_dst = NULL;') 
    389389    ') 
    390390') 
Note: See TracChangeset for help on using the changeset viewer.