- fix build with php-5.2
authorMichael Wallner <mike@php.net>
Wed, 17 May 2006 08:36:04 +0000 (08:36 +0000)
committerMichael Wallner <mike@php.net>
Wed, 17 May 2006 08:36:04 +0000 (08:36 +0000)
http_exception_object.c
http_request_pool_api.c
php_http_std_defs.h

index 422f6ce70193e9f60595b7a30030ec04da62ff5b..06d464ec10e1256f1ad77bc1d0857bf41f34a260 100644 (file)
@@ -35,7 +35,7 @@ zend_class_entry *HTTP_EX_CE(querystring);
 
 PHP_MINIT_FUNCTION(http_exception_object)
 {
-       HTTP_REGISTER_EXCEPTION(HttpException, http_exception_object_ce, zend_exception_get_default());
+       HTTP_REGISTER_EXCEPTION(HttpException, http_exception_object_ce, ZEND_EXCEPTION_GET_DEFAULT());
        HTTP_REGISTER_EXCEPTION(HttpRuntimeException, HTTP_EX_CE(runtime), HTTP_EX_DEF_CE);
        HTTP_REGISTER_EXCEPTION(HttpInvalidParamException, HTTP_EX_CE(invalid_param), HTTP_EX_DEF_CE);
        HTTP_REGISTER_EXCEPTION(HttpHeaderException, HTTP_EX_CE(header), HTTP_EX_DEF_CE);
index cf8421848b4a55ae6f0eabde2361d8d27938f131..e9473e31741b61816b78ed987b68ce38a8830ecf 100644 (file)
@@ -288,11 +288,11 @@ static void move_backtrace_args(zval *from, zval *to TSRMLS_DC)
 {
        zval **args, **trace_0, *old_trace_0, *trace = NULL;
        
-       if ((trace = zend_read_property(zend_exception_get_default(), from, "trace", lenof("trace"), 0 TSRMLS_CC))) {
+       if ((trace = zend_read_property(ZEND_EXCEPTION_GET_DEFAULT(), from, "trace", lenof("trace"), 0 TSRMLS_CC))) {
                if (SUCCESS == zend_hash_index_find(Z_ARRVAL_P(trace), 0, (void *) &trace_0)) {
                        old_trace_0 = *trace_0;
                        if (SUCCESS == zend_hash_find(Z_ARRVAL_PP(trace_0), "args", sizeof("args"), (void *) &args)) {
-                               if ((trace = zend_read_property(zend_exception_get_default(), to, "trace", lenof("trace"), 0 TSRMLS_CC))) {
+                               if ((trace = zend_read_property(ZEND_EXCEPTION_GET_DEFAULT(), to, "trace", lenof("trace"), 0 TSRMLS_CC))) {
                                        if (SUCCESS == zend_hash_index_find(Z_ARRVAL_P(trace), 0, (void *) &trace_0)) {
                                                ZVAL_ADDREF(*args);
                                                add_assoc_zval(*trace_0, "args", *args);
index 9f22bcf5c26f0d44cc65ae8155a2470bf6ee8c91..154f778c15fe0f933f7a7c45177d267fa82886d6 100644 (file)
@@ -306,6 +306,12 @@ typedef int STATUS;
 #      define end_error_handling()
 #endif
 
+#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 2) || PHP_MAJOR_VERSION > 5
+#      define  ZEND_EXCEPTION_GET_DEFAULT() zend_exception_get_default(TSRMLS_C)
+#else
+#      define  ZEND_EXCEPTION_GET_DEFAULT() zend_exception_get_default()
+#endif
+
 #ifndef E_THROW
 #      define E_THROW 0
 #endif