Ignore:
Timestamp:
2012-03-22T18:53:11+01:00 (3 years ago)
Author:
moo
Message:

PHP_5_4: empty hashtable was optimized

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/processor/hashtable.m4

    r823 r824  
    8888        IFCOPY(`dst->pInternalPointer = NULL;   /* Used for element traversal */') DONE(pInternalPointer) 
    8989        IFCOPY(`dst->pListHead = NULL;') DONE(pListHead) 
     90#ifdef ZEND_ENGINE_2_4 
     91        if (src->nTableMask) { 
     92#endif 
    9093        CALLOC(dst->arBuckets, Bucket*, src->nTableSize) 
    9194        DONE(arBuckets) 
    9295        DISABLECHECK(` 
    93  
    9496        for (b = src->pListHead; b != NULL; b = b->pListNext) { 
    9597            ifelse($4, `', `', ` 
     
    155157        } 
    156158        ') 
     159#ifdef ZEND_ENGINE_2_4 
     160    } 
     161    else { /* if (src->nTableMask) */ 
     162        DONE(arBuckets) 
     163    } 
     164#endif 
    157165        IFCOPY(`dst->pListTail = pnew;') DONE(pListTail) 
    158166        IFCOPY(`dst->pDestructor = src->pDestructor;') DONE(pDestructor) 
Note: See TracChangeset for help on using the changeset viewer.