Ticket #150: php5.2.diff

File php5.2.diff, 1.5 kB (added by bart, 2 years ago)
  • eaccelerator.h

    old new  
    4545#   define ZEND_ENGINE_2_1 
    4646#endif 
    4747 
     48#if PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 2 
     49#   define ZEND_ENGINE_2_2 
     50#endif 
     51 
     52 
     53 
    4854/* fixes compile errors on php5.1 */ 
    4955#ifdef STR_EMPTY_ALLOC 
    5056#define empty_string STR_EMPTY_ALLOC() 
     
    358364        eaccelerator_none                       /* don't cache  */ 
    359365} eaccelerator_cache_place; 
    360366 
     367#ifndef align_union 
    361368typedef union align_union { 
    362369  double d; 
    363370  void *v; 
    364371  int (*func)(int); 
    365372  long l; 
    366373} align_union; 
     374#endif 
    367375 
     376typedef union _align_test { 
     377  void *ptr; 
     378  double dbl; 
     379  long lng; 
     380} align_test; 
     381 
    368382/******************************************************************************/ 
    369383 
    370384#ifdef ZTS 
  • ea_store.c

    old new  
    778778        /* Check if this is a parent class. If so, copy unconditionally */ 
    779779        if (parent) { 
    780780                /* unpack the \0classname\0membername\0 style property name to seperate vars */ 
     781#ifdef ZEND_ENGINE_2_2 
     782                zend_unmangle_property_name(p->arKey, p->nKeyLength, &cname, &mname); 
     783#else 
    781784                zend_unmangle_property_name(p->arKey, &cname, &mname); 
     785#endif 
    782786         
    783787                /* lookup the member's info in parent and child */ 
    784788                if((zend_hash_find(&parent->properties_info, mname, strlen(mname)+1, &pinfo.ptr) == SUCCESS) &&