diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2013-12-30 06:13:32 -0800 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2013-12-30 06:13:32 -0800 |
commit | d95729f4588acca4a2fbd74043cf2fb32b9ba94f (patch) | |
tree | c0bcb12014029f24ff493cc85d3f46417c66a8f0 /src/includes.h | |
parent | 678fb09044c87a2f4bf843bb55eb4b057f1c131a (diff) | |
parent | 7c042cfcee984e16e7024a661c95d2cd3eb0b50b (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.h | 16 |
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 |