summaryrefslogtreecommitdiff
path: root/Zend/zend.h
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>1999-12-26 21:21:33 +0000
committerZeev Suraski <zeev@php.net>1999-12-26 21:21:33 +0000
commit235386b24569eb5d41baffa88151550ba04992ce (patch)
tree0db42a31df098a289a813527b823098d41bd5312 /Zend/zend.h
parentc517633b4963b684fd9f43704a72bcbbe4d30bf2 (diff)
downloadphp-git-235386b24569eb5d41baffa88151550ba04992ce.tar.gz
Change ALLOC_ZVAL() semantics
Diffstat (limited to 'Zend/zend.h')
-rw-r--r--Zend/zend.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/Zend/zend.h b/Zend/zend.h
index a97f473f9e..d99fae9cc9 100644
--- a/Zend/zend.h
+++ b/Zend/zend.h
@@ -284,16 +284,16 @@ END_EXTERN_C()
#define INIT_ZVAL(z) z = zval_used_for_init;
-#define ALLOC_ZVAL() (zval *) emalloc(sizeof(zval))
+#define ALLOC_ZVAL(z) (z) = (zval *) emalloc(sizeof(zval))
#define FREE_ZVAL(z) efree(z)
#define ALLOC_INIT_ZVAL(zp) \
- (zp) = ALLOC_ZVAL(); \
+ ALLOC_ZVAL(zp); \
INIT_ZVAL(*zp);
#define MAKE_STD_ZVAL(zv) \
- zv = ALLOC_ZVAL(); \
+ ALLOC_ZVAL(zv); \
INIT_PZVAL(zv);
#define SEPARATE_ZVAL(ppzv) \
@@ -302,7 +302,7 @@ END_EXTERN_C()
\
if (orig_ptr->refcount>1) { \
orig_ptr->refcount--; \
- *(ppzv) = ALLOC_ZVAL(); \
+ ALLOC_ZVAL(*(ppzv)); \
**(ppzv) = *orig_ptr; \
zval_copy_ctor(*(ppzv)); \
(*(ppzv))->refcount=1; \