Changeset 1281 in svn for trunk/xcache/xc_compatibility.h


Ignore:
Timestamp:
2013-07-08T10:00:36+02:00 (2 years ago)
Author:
Xuefer
Message:

remove php 4 support completely

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xcache/xc_compatibility.h

    r1280 r1281  
    2828
    2929#define NOTHING
    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
     30/* ZendEngine version code Switcher */
    3631#ifdef ZEND_ENGINE_2_4
    3732#   define ZEND_24(pre24, v24) v24
     
    112107#   define Z_CLASS_INFO(className) (className)
    113108
    114 static inline int php_output_start_default(TSRMLS_D) { php_start_ob_buffer(NULL, 0, 1 TSRMLS_CC); }
    115 static inline int php_output_get_contents(zval *p TSRMLS_DC) { php_ob_get_buffer(p TSRMLS_CC); }
    116 static inline int php_output_discard(TSRMLS_D) { php_end_ob_buffer(0, 0 TSRMLS_CC); }
     109static inline int php_output_start_default(TSRMLS_D) { return php_start_ob_buffer(NULL, 0, 1 TSRMLS_CC); }
     110static inline int php_output_get_contents(zval *p TSRMLS_DC) { return php_ob_get_buffer(p TSRMLS_CC); }
     111static inline int php_output_discard(TSRMLS_D) { php_end_ob_buffer(0, 0 TSRMLS_CC); return SUCCESS; }
    117112#endif
    118113
     
    213208/* }}} */
    214209
    215 /* the class entry type to be stored in class_table */
    216 typedef 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 
    230210#ifndef ZEND_ENGINE_2_3
    231 size_t xc_dirname(char *path, size_t len);
    232 #define zend_dirname xc_dirname
     211#include "ext/standard/php_string.h"
     212static inline size_t zend_dirname(char *path, size_t len) { return php_dirname(path, len); }
    233213long xc_atol(const char *str, int len);
    234214#define zend_atol xc_atol
     
    240220
    241221#ifndef PHP_FE_END
    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
     222#   define PHP_FE_END {NULL, NULL, NULL, 0, 0}
    247223#endif
    248224
Note: See TracChangeset for help on using the changeset viewer.