From c0fd8021cff2c4a134937098ef4fa9779c1924bd Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Tue, 10 Mar 2009 17:25:22 +0000 Subject: [PATCH] fix php4 build --- missing.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/missing.h b/missing.h index d767f40..a9da727 100644 --- a/missing.h +++ b/missing.h @@ -71,6 +71,19 @@ # 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; \ -- 2.30.2