From e42abeafeca245950ebc47c7312913e68262d40e Mon Sep 17 00:00:00 2001 From: Sammy Kaye Powers Date: Thu, 24 Sep 2020 12:57:43 -0700 Subject: Pass zend_execute_data instead of zend_function to fcall init The motivation for this change is to prevent extensions from having to check executor globals for the current execute_data during function call init. A previous implementation of the observer API initialized the function call from runtime cache initialization before execute_data was allocated which is why zend_function was passed in. But now that the observer API is implemented via opcode specialization, it makes sense to pass in the execute_data. This also keeps the API a bit more consistent for existing extensions that already hook zend_execute_ex. Closes GH-6209 --- Zend/zend_observer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zend/zend_observer.h') diff --git a/Zend/zend_observer.h b/Zend/zend_observer.h index 246a3a61be..1d20306a17 100644 --- a/Zend/zend_observer.h +++ b/Zend/zend_observer.h @@ -50,7 +50,7 @@ typedef struct _zend_observer_fcall_handlers { } zend_observer_fcall_handlers; /* If the fn should not be observed then return {NULL, NULL} */ -typedef zend_observer_fcall_handlers (*zend_observer_fcall_init)(zend_function *func); +typedef zend_observer_fcall_handlers (*zend_observer_fcall_init)(zend_execute_data *execute_data); // Call during minit/startup ONLY ZEND_API void zend_observer_fcall_register(zend_observer_fcall_init); -- cgit v1.2.1