From 5764a0a87f47223edcab9c023905dd63d6bcf0bc Mon Sep 17 00:00:00 2001 From: longxinhui Date: Mon, 5 Jul 2021 11:01:09 +0800 Subject: [PATCH] back to beta --- extension/php_xhprof.h | 2 +- extension/xhprof.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/extension/php_xhprof.h b/extension/php_xhprof.h index b3b31435..2fe5c98f 100755 --- a/extension/php_xhprof.h +++ b/extension/php_xhprof.h @@ -43,7 +43,7 @@ extern zend_module_entry xhprof_module_entry; */ /* XHProf version */ -#define XHPROF_VERSION "2.3.2" +#define XHPROF_VERSION "2.3.3-dev" #define XHPROF_FUNC_HASH_COUNTERS_SIZE 1024 diff --git a/extension/xhprof.c b/extension/xhprof.c index 8a043fe5..7bcc9652 100755 --- a/extension/xhprof.c +++ b/extension/xhprof.c @@ -1008,19 +1008,19 @@ static void tracer_observer_end(zend_execute_data *ex, zval *return_value) { } } - static zend_observer_fcall_handlers tracer_observer(zend_execute_data *execute_data) { + zend_observer_fcall_handlers handlers = {NULL, NULL}; if (!XHPROF_G(enabled)) { - return (zend_observer_fcall_handlers){NULL, NULL}; + return handlers; } - - zend_function *func = execute_data->func; - if (!func->common.function_name) { - return (zend_observer_fcall_handlers){NULL, NULL}; + if (!execute_data->func || !execute_data->func->common.function_name) { + return handlers; } - return (zend_observer_fcall_handlers){tracer_observer_begin, tracer_observer_end}; + handlers.begin = tracer_observer_begin; + handlers.end = tracer_observer_end; + return handlers; } #else ZEND_DLEXPORT void hp_execute_ex (zend_execute_data *execute_data)