Skip to content

Commit

Permalink
Added php_verdep.h
Browse files Browse the repository at this point in the history
  • Loading branch information
kamijo committed Oct 18, 2012
1 parent 66fc760 commit 6ce87aa
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
1 change: 1 addition & 0 deletions lz4.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "php.h"
#include "php_ini.h"
#include "ext/standard/info.h"
#include "php_verdep.h"
#include "php_lz4.h"

/* lz4 */
Expand Down
65 changes: 65 additions & 0 deletions php_verdep.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#ifndef PHP_VERDEP_H
#define PHP_VERDEP_H

#ifndef ZED_FE_END
#define ZEND_FE_END { NULL, NULL, NULL, 0, 0 }
#endif

#ifndef Z_SET_REFCOUNT_P
#define Z_SET_REFCOUNT_P(pz, rc) ((pz)->refcount = rc)
#endif

#ifndef Z_UNSET_ISREF_PP
#define Z_UNSET_ISREF_PP(ppz) Z_UNSET_ISREF_P(*(ppz))
#endif

#ifndef Z_UNSET_ISREF_P
#define Z_UNSET_ISREF_P(pz) ((pz)->is_ref = 0)
#endif

#ifndef Z_ISREF_PP
#define Z_ISREF_PP(ppz) Z_ISREF_P(*(ppz))
#endif

#ifndef Z_ISREF_P
#if ZEND_MODULE_API_NO >= 20090626
#define Z_ISREF_P(pz) zval_isref_p(pz)
#else
#define Z_ISREF_P(pz) ((pz)->is_ref)
#endif
#endif

#ifndef Z_ADDREF_PP
#define Z_ADDREF_PP(ppz) Z_ADDREF_P(*(ppz))
#endif

#ifndef Z_ADDREF_P
#if ZEND_MODULE_API_NO >= 20090626
#define Z_ADDREF_P(pz) zval_addref_p(pz)
#else
#define Z_ADDREF_P(pz) (++(pz)->refcount)
#endif
#endif

#ifndef Z_SET_ISREF_PP
#define Z_SET_ISREF_PP(ppz) Z_SET_ISREF_P(*(ppz))
#endif

#ifndef Z_SET_ISREF_P
#if ZEND_MODULE_API_NO >= 20090626
#define Z_SET_ISREF_P(pz) zval_set_isref_p(pz)
#else
#define Z_SET_ISREF_P(pz) ((pz)->is_ref = 1)
#endif
#endif

#ifndef array_init_size
#define array_init_size(arg, size) _array_init((arg) ZEND_FILE_LINE_CC)
#endif

#ifndef zend_parse_parameters_none
#define zend_parse_parameters_none() \
zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "")
#endif

#endif /* PHP_VERDEP_H */

0 comments on commit 6ce87aa

Please sign in to comment.