From aa0709e71ab81e89b21b4244c6923b6aadc45a3a Mon Sep 17 00:00:00 2001 From: Xuefer Date: Thu, 11 Sep 2014 16:51:57 +0000 Subject: [PATCH] fix php4 build git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1525 c26eb9a1-5813-0410-bd6c-c2e55f420ca7 --- xcache/xc_compatibility.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/xcache/xc_compatibility.h b/xcache/xc_compatibility.h index 9fad4db..8840a30 100644 --- a/xcache/xc_compatibility.h +++ b/xcache/xc_compatibility.h @@ -219,6 +219,35 @@ typedef const zstr const_zstr; #endif /* }}} */ +#ifndef ZVAL_COPY_VALUE +# define ZVAL_COPY_VALUE(z, v) (z)->value = (v)->value +#endif + +#ifndef ZVAL_ZVAL +# define ZVAL_ZVAL(z, zv, copy, dtor) do { \ + zval *__z = (z); \ + zval *__zv = (zv); \ + ZVAL_COPY_VALUE(__z, __zv); \ + if (copy) { \ + zval_copy_ctor(__z); \ + } \ + if (dtor) { \ + if (!copy) { \ + ZVAL_NULL(__zv); \ + } \ + zval_ptr_dtor(&__zv); \ + } \ + } while (0) +#endif + +#ifndef RETVAL_ZVAL +# define RETVAL_ZVAL(zv, copy, dtor) ZVAL_ZVAL(return_value, zv, copy, dtor) +#endif + +#ifndef RETURN_ZVAL +# define RETURN_ZVAL(zv, copy, dtor) { RETVAL_ZVAL(zv, copy, dtor); return; } +#endif + /* the class entry type to be stored in class_table */ typedef ZESW(zend_class_entry, zend_class_entry*) xc_cest_t;