From 99fc78fa4acf4035610c5460a95070ff967e943d Mon Sep 17 00:00:00 2001 From: Zach Neumann Date: Wed, 15 May 2024 09:03:53 -0600 Subject: [PATCH] try not using zend lookup --- agent/php_user_instrument.c | 2 +- agent/php_wrapper.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/agent/php_user_instrument.c b/agent/php_user_instrument.c index 62b9fb942..b607e24eb 100644 --- a/agent/php_user_instrument.c +++ b/agent/php_user_instrument.c @@ -493,7 +493,7 @@ nruserfn_t* nr_php_add_custom_tracer_named(const char* namestr, * non-transients to be freed when the linked list is disposed of which is at * module shutdown */ nr_php_add_custom_tracer_common(wraprec); -#if ZEND_MODULE_API_NO >= ZEND_8_2_X_API_NO +#if ZEND_MODULE_API_NO >= ZEND_8_3_X_API_NO if (orig_func) { // Before messing with our handlers, we must ensure that the observer fields of the function are initialized begin_handler = (zend_observer_fcall_begin_handler *)&ZEND_OP_ARRAY_EXTENSION((&(orig_func)->common), zend_observer_fcall_op_array_extension); diff --git a/agent/php_wrapper.c b/agent/php_wrapper.c index 398c1a59e..bbdb3356e 100644 --- a/agent/php_wrapper.c +++ b/agent/php_wrapper.c @@ -83,7 +83,7 @@ nruserfn_t* nr_php_wrap_callable_before_after( if (nrl_should_print(NRL_VERBOSEDEBUG, NRL_INSTRUMENT) && NULL != name) { nr_free(name); } -#if ZEND_MODULE_API_NO >= ZEND_8_2_X_API_NO +#if ZEND_MODULE_API_NO >= ZEND_8_3_X_API_NO if (callable) { // Before messing with our handlers, we must ensure that the observer fields of the function are initialized begin_handler = (zend_observer_fcall_begin_handler *)&ZEND_OP_ARRAY_EXTENSION((&(callable)->common), zend_observer_fcall_op_array_extension); @@ -165,7 +165,7 @@ nruserfn_t* nr_php_wrap_callable(zend_function* callable, __func__); } else { wraprec->special_instrumentation = callback; -#if ZEND_MODULE_API_NO >= ZEND_8_2_X_API_NO +#if ZEND_MODULE_API_NO >= ZEND_8_3_X_API_NO if (callable) { // Before messing with our handlers, we must ensure that the observer fields of the function are initialized begin_handler = (zend_observer_fcall_begin_handler *)&ZEND_OP_ARRAY_EXTENSION((&(callable)->common), zend_observer_fcall_op_array_extension);