summaryrefslogtreecommitdiff
path: root/src/includes.h
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2013-12-30 06:13:32 -0800
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2013-12-30 06:13:32 -0800
commitd95729f4588acca4a2fbd74043cf2fb32b9ba94f (patch)
treec0bcb12014029f24ff493cc85d3f46417c66a8f0 /src/includes.h
parent678fb09044c87a2f4bf843bb55eb4b057f1c131a (diff)
parent7c042cfcee984e16e7024a661c95d2cd3eb0b50b (diff)
Merge pull request #10 from BullSoft/master
Add macros for compatible with PHP 5.3
Diffstat (limited to 'src/includes.h')
-rw-r--r--src/includes.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/includes.h b/src/includes.h
index 933e317..501a71d 100644
--- a/src/includes.h
+++ b/src/includes.h
@@ -76,3 +76,19 @@
#include "methodmember.h"
#include "arithmetic.h"
+#ifndef ZVAL_COPY_VALUE
+#define ZVAL_COPY_VALUE(z, v) \
+ do { \
+ (z)->value = (v)->value; \
+ Z_TYPE_P(z) = Z_TYPE_P(v); \
+ } while (0)
+#endif
+
+#ifndef INIT_PZVAL_COPY
+#define INIT_PZVAL_COPY(z, v) \
+ do { \
+ ZVAL_COPY_VALUE(z, v); \
+ Z_SET_REFCOUNT_P(z, 1); \
+ Z_UNSET_ISREF_P(z); \
+ } while (0)
+#endif