Skip to content

Commit

Permalink
revert version change
Browse files Browse the repository at this point in the history
  • Loading branch information
ZNeumann committed May 15, 2024
1 parent adac80a commit 246f8d9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions agent/php_user_instrument.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions agent/php_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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);
Expand Down Expand Up @@ -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

Expand All @@ -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);
Expand Down

0 comments on commit 246f8d9

Please sign in to comment.