From: Michael Wallner Date: Tue, 10 Mar 2009 17:25:22 +0000 (+0000) Subject: fix php4 build X-Git-Tag: RELEASE_1_7_0b2~31 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=c0fd8021cff2c4a134937098ef4fa9779c1924bd;p=m6w6%2Fext-http fix php4 build --- 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; \