From 4a0773a8adef0cbabe5fca78af7f182cce54c151 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 22 Mar 2012 14:25:00 +0100 Subject: [PATCH] fixed usage of Z_ADDREF_P for PHP 5.2 in the C extension --- CHANGELOG | 1 + ext/twig/twig.c | 4 ++++ 2 files changed, 5 insertions(+), 0 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 058e137..34438ed 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,6 @@ * 1.7.0 (2012-XX-XX) + * fixed usage of Z_ADDREF_P for PHP 5.2 in the C extension * fixed compilation of numeric values used in templates when using a locale where the decimal separator is not a dot * made the strategy used to guess the real template file name and line number in exception messages much faster and more accurate diff --git a/ext/twig/twig.c b/ext/twig/twig.c index 92b0893..880b964 100644 --- a/ext/twig/twig.c +++ b/ext/twig/twig.c @@ -27,6 +27,10 @@ #include "Zend/zend_interfaces.h" #include "Zend/zend_exceptions.h" +#ifndef Z_ADDREF_P +#define Z_ADDREF_P(pz) (pz)->refcount++ +#endif + ZEND_BEGIN_ARG_INFO_EX(twig_template_get_attribute_args, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 6) ZEND_ARG_INFO(0, template) ZEND_ARG_INFO(0, object) -- 1.7.2.5