From 246f8d9cf2e3d68c3329d0aea857d174e3efa785 Mon Sep 17 00:00:00 2001 From: Zach Neumann Date: Wed, 15 May 2024 11:27:29 -0600 Subject: [PATCH] revert version change --- agent/php_user_instrument.c | 6 +++--- agent/php_wrapper.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/agent/php_user_instrument.c b/agent/php_user_instrument.c index 3e91d13f2..62b9fb942 100644 --- a/agent/php_user_instrument.c +++ b/agent/php_user_instrument.c @@ -450,7 +450,7 @@ nruserfn_t* nr_php_add_custom_tracer_named(const char* namestr, size_t namestrlen) { nruserfn_t* wraprec; nruserfn_t* p; -#if ZEND_MODULE_API_NO >= ZEND_8_3_X_API_NO +#if ZEND_MODULE_API_NO >= ZEND_8_2_X_API_NO zend_function* orig_func; zend_observer_fcall_begin_handler *begin_handler; #endif @@ -483,7 +483,7 @@ nruserfn_t* nr_php_add_custom_tracer_named(const char* namestr, NRP_PHP(wraprec->classname), (0 == wraprec->classname) ? "" : "::", NRP_PHP(wraprec->funcname)); -#if ZEND_MODULE_API_NO >= ZEND_8_3_X_API_NO +#if ZEND_MODULE_API_NO >= ZEND_8_2_X_API_NO orig_func = nr_php_wrap_user_function_internal(wraprec TSRMLS_CC); #else nr_php_wrap_user_function_internal(wraprec TSRMLS_CC); @@ -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_3_X_API_NO +#if ZEND_MODULE_API_NO >= ZEND_8_2_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 f9867d0c8..398c1a59e 100644 --- a/agent/php_wrapper.c +++ b/agent/php_wrapper.c @@ -64,7 +64,7 @@ nruserfn_t* nr_php_wrap_callable_before_after( nrspecialfn_t before_callback, nrspecialfn_t after_callback) { char* name = NULL; -#if ZEND_MODULE_API_NO >= ZEND_8_3_X_API_NO +#if ZEND_MODULE_API_NO >= ZEND_8_2_X_API_NO zend_observer_fcall_begin_handler *begin_handler; #endif @@ -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_3_X_API_NO +#if ZEND_MODULE_API_NO >= ZEND_8_2_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); @@ -152,7 +152,7 @@ nruserfn_t* nr_php_wrap_callable(zend_function* callable, nrspecialfn_t callback TSRMLS_DC) { /* creates a transient wraprec */ nruserfn_t* wraprec = nr_php_add_custom_tracer_callable(callable TSRMLS_CC); -#if ZEND_MODULE_API_NO >= ZEND_8_3_X_API_NO +#if ZEND_MODULE_API_NO >= ZEND_8_2_X_API_NO zend_observer_fcall_begin_handler *begin_handler; #endif @@ -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_3_X_API_NO +#if ZEND_MODULE_API_NO >= ZEND_8_2_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);