Skip to content

Commit

Permalink
try not using zend lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
ZNeumann committed May 15, 2024
1 parent 3956a3f commit 99fc78f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion agent/php_user_instrument.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions agent/php_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 99fc78f

Please sign in to comment.