Ignore:
Timestamp:
2013-07-15T19:37:57+02:00 (17 months ago)
Author:
moo
Message:

add back PHP_4 code for disassembler

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xcache/xc_compatibility.h

    r1281 r1321  
    2828 
    2929#define NOTHING 
    30 /* ZendEngine version code Switcher */ 
     30/* ZendEngine code Switcher */ 
     31#ifndef ZEND_ENGINE_2 
     32#   define ZESW(v1, v2) v1 
     33#else 
     34#   define ZESW(v1, v2) v2 
     35#endif 
    3136#ifdef ZEND_ENGINE_2_4 
    3237#   define ZEND_24(pre24, v24) v24 
     
    208213/* }}} */ 
    209214 
     215/* the class entry type to be stored in class_table */ 
     216typedef ZESW(zend_class_entry, zend_class_entry*) xc_cest_t; 
     217 
     218/* xc_cest_t to (zend_class_entry*) */ 
     219#define CestToCePtr(st) (ZESW(\ 
     220            &(st), \ 
     221            st \ 
     222            ) ) 
     223 
     224/* ZCEP=zend class entry ptr */ 
     225#define ZCEP_REFCOUNT_PTR(pce) (ZESW( \ 
     226            (pce)->refcount, \ 
     227            &((pce)->refcount) \ 
     228            )) 
     229 
    210230#ifndef ZEND_ENGINE_2_3 
    211 #include "ext/standard/php_string.h" 
    212 static inline size_t zend_dirname(char *path, size_t len) { return php_dirname(path, len); } 
     231size_t xc_dirname(char *path, size_t len); 
     232#define zend_dirname xc_dirname 
    213233long xc_atol(const char *str, int len); 
    214234#define zend_atol xc_atol 
     
    220240 
    221241#ifndef PHP_FE_END 
    222 #   define PHP_FE_END {NULL, NULL, NULL, 0, 0} 
     242#   ifdef ZEND_ENGINE_2 
     243#       define PHP_FE_END {NULL, NULL, NULL, 0, 0} 
     244#   else 
     245#       define PHP_FE_END {NULL, NULL, NULL} 
     246#   endif 
    223247#endif 
    224248 
Note: See TracChangeset for help on using the changeset viewer.