Changeset 247

Show
Ignore:
Timestamp:
07/27/06 11:43:59 (2 years ago)
Author:
bart
Message:

* Some fixes to make eAccelerator compile with php 5.2, this fixes bug #150
* Restore toString methods correctly with php 5.2

-This line, and those below, will be ignored--

M eaccelerator.h
M ea_restore.c
M ea_store.c
M ChangeLog?

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • eaccelerator/trunk/ChangeLog

    r246 r247  
    55        * Killing the very broken encoder. Once when eAccelerator is in full 
    66          shape an encoder may return. 
     7        * Some fixes to make eAccelerator compile with php 5.2, this fixes bug #150 
     8        * Restore __toString methods correctly with php 5.2 
    79 
    8102006-07-25  Bart Vanbrabant <bart.vanbrabant at zoeloelip.be> 
  • eaccelerator/trunk/ea_restore.c

    r241 r247  
    773773                                         memcmp(fname_lc, ZEND_CALL_FUNC_NAME, sizeof(ZEND_CALL_FUNC_NAME)) == 0) 
    774774                                to->__call = f; 
     775#  ifdef ZEND_ENGINE_2_2 
     776            else if (fname_len == sizeof(ZEND_TOSTRING_FUNC_NAME) - 1 && 
     777                     memcmp(fname_lc, ZEND_TOSTRING_FUNC_NAME, sizeof(ZEND_TOSTRING_FUNC_NAME)) == 0) 
     778                to->__tostring = f; 
     779#  endif 
    775780                } 
    776781                if (to->parent) { 
  • eaccelerator/trunk/ea_store.c

    r246 r247  
    777777        if (parent) { 
    778778                /* unpack the \0classname\0membername\0 style property name to seperate vars */ 
     779#ifdef ZEND_ENGINE_2_2 
     780                zend_unmangle_property_name(p->arKey, p->nKeyLength, &cname, &mname); 
     781#else 
    779782                zend_unmangle_property_name(p->arKey, &cname, &mname); 
     783#endif 
    780784         
    781785                /* lookup the member's info in parent and child */ 
  • eaccelerator/trunk/eaccelerator.h

    r246 r247  
    4444#if PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 1 
    4545#   define ZEND_ENGINE_2_1 
     46#endif 
     47 
     48#if PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 2 
     49#   define ZEND_ENGINE_2_2 
    4650#endif 
    4751 
     
    356360} eaccelerator_cache_place; 
    357361 
     362#ifndef align_union 
    358363typedef union align_union { 
    359364  double d; 
     
    362367  long l; 
    363368} align_union; 
     369#endif 
     370 
     371typedef union _align_test { 
     372  void *ptr; 
     373  double dbl; 
     374  long lng; 
     375} align_test; 
    364376 
    365377/******************************************************************************/