Changeset 270

Show
Ignore:
Timestamp:
09/15/06 15:15:06 (2 years ago)
Author:
bart
Message:

Add php 5.2 support. These are minimal changes so they shouldn't affect stability.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • eaccelerator/branches/0.9.5/ChangeLog

    r269 r270  
    33        * Reverse changeset 205 (doc-comment exclusion) from Tom Regner  
    44          <t.regner at librics.de>.  
     5        * Some fixes to make eAccelerator compile with php 5.2, this fixes bug #150 
     6        * Restore __toString methods correctly with php 5.2 
    57 
    682006-08-29  Hans Rakers <hans at parse dot nl> 
  • eaccelerator/branches/0.9.5/ea_restore.c

    r269 r270  
    793793                                         memcmp(fname_lc, ZEND_CALL_FUNC_NAME, sizeof(ZEND_CALL_FUNC_NAME)) == 0) 
    794794                                to->__call = f; 
     795#  ifdef ZEND_ENGINE_2_2 
     796            else if (fname_len == sizeof(ZEND_TOSTRING_FUNC_NAME) - 1 && 
     797                     memcmp(fname_lc, ZEND_TOSTRING_FUNC_NAME, sizeof(ZEND_TOSTRING_FUNC_NAME)) == 0) 
     798                to->__tostring = f; 
     799#  endif 
    795800                } 
    796801                if (to->parent) { 
  • eaccelerator/branches/0.9.5/ea_store.c

    r269 r270  
    808808        if (parent) { 
    809809                /* unpack the \0classname\0membername\0 style property name to seperate vars */ 
     810#ifdef ZEND_ENGINE_2_2 
     811                zend_unmangle_property_name(p->arKey, p->nKeyLength, &cname, &mname); 
     812#else 
    810813                zend_unmangle_property_name(p->arKey, &cname, &mname); 
     814#endif 
    811815         
    812816                /* lookup the member's info in parent and child */ 
  • eaccelerator/branches/0.9.5/eaccelerator.h

    r269 r270  
    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 
     
    379383} align_union; 
    380384 
     385#ifdef ZEND_ENGINE_2_2 
     386typedef union _align_test { 
     387  void *ptr; 
     388  double dbl; 
     389  long lng; 
     390} align_test; 
     391#endif 
     392 
    381393/******************************************************************************/ 
    382394