Show
Ignore:
Timestamp:
06/20/08 11:20:17 (7 months ago)
Author:
bart
Message:

First stab at php 5.3 support. Only fixes the script cache. phpMyAdmin seems to work with these changes.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • eaccelerator/trunk/ea_restore.c

    r344 r348  
    5050#endif 
    5151 
     52#ifdef ZEND_ENGINE_2_3 
     53    #define RESET_PZVAL_REFCOUNT(z) Z_SET_REFCOUNT_P(z, 1) 
     54#else 
     55    #define RESET_PZVAL_REFCOUNT(z) (z)->refcount = 1; 
     56#endif 
     57 
    5258/* pointer to the properties_info hashtable destructor */ 
    5359dtor_func_t properties_info_dtor = NULL; 
     
    277283    restore_zval(p TSRMLS_CC); 
    278284    /* hrak: reset refcount to make sure there is one reference to this val, and prevent memleaks */ 
    279     p->refcount = 1
     285    RESET_PZVAL_REFCOUNT(p)
    280286    return p; 
    281287} 
     
    539545    to->try_catch_array = from->try_catch_array; 
    540546    to->last_try_catch = from->last_try_catch; 
     547#ifdef ZEND_ENGINE_2_3 
     548    to->this_var = from->this_var; 
     549#else 
    541550    to->uses_this = from->uses_this; 
     551#endif 
    542552 
    543553    to->line_start = from->line_start; 
     
    556566            Bucket *p = to->static_variables->pListHead; 
    557567            while (p != NULL) { 
    558                 ((zval *) (p->pDataPtr))->refcount = 1
     568                RESET_PZVAL_REFCOUNT((zval*) p->pDataPtr)
    559569                p = p->pListNext; 
    560570            }