summaryrefslogtreecommitdiff
path: root/src/includes.h
diff options
context:
space:
mode:
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 18e9951..e99328c 100644
--- a/src/includes.h
+++ b/src/includes.h
@@ -75,3 +75,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