summaryrefslogtreecommitdiff
path: root/xcache
diff options
context:
space:
mode:
authorXuefer <xuefer@gmail.com>2014-09-11 16:51:57 +0000
committerXuefer <xuefer@gmail.com>2014-09-11 16:51:57 +0000
commitaa0709e71ab81e89b21b4244c6923b6aadc45a3a (patch)
tree33fa289df820e77abc7db21f73b68bc142fd88a8 /xcache
parent293e6ab44a1a2f4fab913d5ae4603e64adb2e243 (diff)
downloadxcache-aa0709e71ab81e89b21b4244c6923b6aadc45a3a.tar.gz
xcache-aa0709e71ab81e89b21b4244c6923b6aadc45a3a.zip
fix php4 build
git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1525 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
Diffstat (limited to 'xcache')
-rw-r--r--xcache/xc_compatibility.h29
1 files changed, 29 insertions, 0 deletions
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;