com php-src: Make zend_get_exception_base static.: Zend/zend_exceptions.c Zend/zend_exceptions.h ex t/soap/soap.c

From: Date: Sun, 17 May 2015 16:52:41 +0000
Subject: com php-src: Make zend_get_exception_base static.: Zend/zend_exceptions.c Zend/zend_exceptions.h ex t/soap/soap.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-87331@lists.php.net to get a copy of this message
Commit: 26b35cab46d20937724fe97682d630603ef799d3 Author: Aaron Piotrowski <aaron@trowski.com> Sun, 17 May 2015 11:15:32 -0500 Parents: 434a46612e05c079da1116960cf2a2d28f4d8256 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=26b35cab46d20937724fe97682d630603ef799d3 Log: Make zend_get_exception_base static. Soap extension can use other API functions. Changed paths: M Zend/zend_exceptions.c M Zend/zend_exceptions.h M ext/soap/soap.c Diff: diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 96e4261..b44bb95 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -38,13 +38,9 @@ static zend_class_entry *type_error_ce; static zend_object_handlers default_exception_handlers; ZEND_API void (*zend_throw_exception_hook)(zval *ex); -ZEND_API zend_class_entry *zend_get_exception_base(zval *object) +static zend_class_entry *zend_get_exception_base(zval *object) { - if (instanceof_function(Z_OBJCE_P(object), error_ce)) { - return error_ce; - } - - return default_exception_ce; + return instanceof_function(Z_OBJCE_P(object), default_exception_ce) ? default_exception_ce : error_ce; } void zend_exception_set_previous(zend_object *exception, zend_object *add_previous) diff --git a/Zend/zend_exceptions.h b/Zend/zend_exceptions.h index bae4c35..6f7ceed 100644 --- a/Zend/zend_exceptions.h +++ b/Zend/zend_exceptions.h @@ -34,8 +34,6 @@ ZEND_API void zend_throw_exception_internal(zval *exception); void zend_register_default_exception(void); -ZEND_API zend_class_entry *zend_get_exception_base(zval *object); - ZEND_API zend_class_entry *zend_exception_get_default(void); ZEND_API zend_class_entry *zend_get_error_exception(void); ZEND_API zend_class_entry *zend_get_error(void); diff --git a/ext/soap/soap.c b/ext/soap/soap.c index e6c7e5f..05c7b85 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -1499,7 +1499,7 @@ static void _soap_server_exception(soapServicePtr service, sdlFunctionPtr functi } else if (instanceof_function(Z_OBJCE(exception_object), zend_get_error())) { if (service->send_errors) { zval rv; - zend_string *msg = zval_get_string(zend_read_property(zend_get_exception_base(&exception_object), &exception_object, "message", sizeof("message")-1, 0, &rv)); + zend_string *msg = zval_get_string(zend_read_property(zend_get_error(), &exception_object, "message", sizeof("message")-1, 0, &rv)); add_soap_fault_ex(&exception_object, this_ptr, "Server", msg->val, NULL, NULL); zend_string_release(msg); } else { @@ -2602,7 +2602,7 @@ static int do_request(zval *this_ptr, xmlDoc *request, char *location, char *act zval exception_object; ZVAL_OBJ(&exception_object, EG(exception)); - msg = zval_get_string(zend_read_property(zend_get_exception_base(&exception_object), &exception_object, "message", sizeof("message")-1, 0, &rv)); + msg = zval_get_string(zend_read_property(zend_get_error(), &exception_object, "message", sizeof("message")-1, 0, &rv)); /* change class */ EG(exception)->ce = soap_fault_class_entry; set_soap_fault(&exception_object, NULL, "Client", msg->val, NULL, NULL, NULL);

« previous php.cvs (#87331) next »