From: Michael Wallner Date: Tue, 10 Mar 2009 17:25:50 +0000 (+0000) Subject: fix php4 build X-Git-Tag: RELEASE_1_6_4~9 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=4338b6468498ec4d05535837608695f282dc871f;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; \