diff options
author | Gu Weigang <guweigang@outlook.com> | 2013-12-13 13:29:34 +0800 |
---|---|---|
committer | Gu Weigang <guweigang@outlook.com> | 2013-12-13 13:29:34 +0800 |
commit | 7c042cfcee984e16e7024a661c95d2cd3eb0b50b (patch) | |
tree | 1ea956b13fa9108c6b29e7505b998ea2d75954db /src/includes.h | |
parent | e84fb687091e7093f9aa72f74ce4e678ab84e5f3 (diff) |
add macros for PHP 5.3
Diffstat (limited to 'src/includes.h')
-rw-r--r-- | src/includes.h | 16 |
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 |