Browse code

fixed usage of Z_ADDREF_P for PHP 5.2 in the C extension

Fabien Potencier authored on 22/03/2012 13:25:00
Showing 2 changed files
... ...
@@ -1,5 +1,6 @@
1 1
 * 1.7.0 (2012-XX-XX)
2 2
 
3
+ * fixed usage of Z_ADDREF_P for PHP 5.2 in the C extension
3 4
  * fixed compilation of numeric values used in templates when using a locale where the decimal separator is not a dot
4 5
  * made the strategy used to guess the real template file name and line number in exception messages much faster and more accurate
5 6
 
... ...
@@ -27,6 +27,10 @@
27 27
 #include "Zend/zend_interfaces.h"
28 28
 #include "Zend/zend_exceptions.h"
29 29
 
30
+#ifndef Z_ADDREF_P
31
+#define Z_ADDREF_P(pz)                (pz)->refcount++
32
+#endif
33
+
30 34
 ZEND_BEGIN_ARG_INFO_EX(twig_template_get_attribute_args, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 6)
31 35
 	ZEND_ARG_INFO(0, template)
32 36
 	ZEND_ARG_INFO(0, object)