From: Marcus Boerger Date: Sat, 3 Feb 2007 16:31:36 +0000 (+0000) Subject: - Allow building with 5.1 (not all works thenperfectly though) X-Git-Tag: RELEASE_1_0_0RC1~28 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=725148cc9442c3b719fe9bf1745c443b05beb27a;p=php - Allow building with 5.1 (not all works thenperfectly though) --- diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index 74ca297c1f..f3c78d61da 100755 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -1156,12 +1156,18 @@ zend_function_entry phar_exception_methods[] = { #define REGISTER_PHAR_CLASS_CONST_LONG(class_name, const_name, value) \ zend_declare_class_constant_long(class_name, const_name, sizeof(const_name)-1, (long)value TSRMLS_CC); +#if PHP_VERSION_ID < 50200 +# define phar_exception_get_default() zend_exception_get_default() +#else +# define phar_exception_get_default() zend_exception_get_default(TSRMLS_C) +#endif + void phar_object_init(TSRMLS_D) /* {{{ */ { zend_class_entry ce; INIT_CLASS_ENTRY(ce, "PharException", phar_exception_methods); - phar_ce_PharException = zend_register_internal_class_ex(&ce, zend_exception_get_default(TSRMLS_C), NULL TSRMLS_CC); + phar_ce_PharException = zend_register_internal_class_ex(&ce, phar_exception_get_default(), NULL TSRMLS_CC); #if HAVE_SPL INIT_CLASS_ENTRY(ce, "Phar", php_archive_methods);