]> granicus.if.org Git - php/commitdiff
- Allow building with 5.1 (not all works thenperfectly though)
authorMarcus Boerger <helly@php.net>
Sat, 3 Feb 2007 16:31:36 +0000 (16:31 +0000)
committerMarcus Boerger <helly@php.net>
Sat, 3 Feb 2007 16:31:36 +0000 (16:31 +0000)
ext/phar/phar_object.c

index 74ca297c1f2cda7db8da6b4d0eb113b822561824..f3c78d61dabbdb9a72ab7f4108a9c205bfbc00df 100755 (executable)
@@ -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);