fix php4 build
authorMichael Wallner <mike@php.net>
Tue, 10 Mar 2009 17:25:22 +0000 (17:25 +0000)
committerMichael Wallner <mike@php.net>
Tue, 10 Mar 2009 17:25:22 +0000 (17:25 +0000)
missing.h

index d767f40c7cf2733a42576a131c6b2e0a6035530d..a9da727fce1439065c735c2bde725c4ac2a34501 100644 (file)
--- a/missing.h
+++ b/missing.h
 #      define ZVAL_ADDREF Z_ADDREF_P
 #endif
 
+#ifndef SEPARATE_ARG_IF_REF
+#define SEPARATE_ARG_IF_REF(zv) \
+       if (PZVAL_IS_REF(zv)) { \
+               zval *ov = zv; \
+               ALLOC_INIT_ZVAL(zv); \
+               Z_TYPE_P(zv) = Z_TYPE_P(ov); \
+               zv->value = ov->value; \
+               zval_copy_ctor(zv); \
+       } else { \
+               ZVAL_ADDREF(zv); \
+       }
+#endif
+
 #ifndef ZVAL_ZVAL
 #define ZVAL_ZVAL(z, zv, copy, dtor) {  \
                int is_ref, refcount;           \