File tree 2 files changed +11
-6
lines changed
2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -372,8 +372,18 @@ ZEND_API const char *get_active_class_name(const char **space);
372
372
ZEND_API const char * get_active_function_name (void );
373
373
ZEND_API const char * get_active_function_arg_name (uint32_t arg_num );
374
374
ZEND_API const char * get_function_arg_name (const zend_function * func , uint32_t arg_num );
375
- ZEND_API zend_function * zend_active_function (void );
376
375
ZEND_API zend_function * zend_active_function_ex (zend_execute_data * execute_data );
376
+
377
+ static zend_always_inline zend_function * zend_active_function (void )
378
+ {
379
+ zend_function * func = EG (current_execute_data )-> func ;
380
+ if (ZEND_USER_CODE (func -> type )) {
381
+ return zend_active_function_ex (EG (current_execute_data ));
382
+ } else {
383
+ return func ;
384
+ }
385
+ }
386
+
377
387
ZEND_API zend_string * get_active_function_or_method_name (void );
378
388
ZEND_API zend_string * get_function_or_method_name (const zend_function * func );
379
389
ZEND_API const char * zend_get_executed_filename (void );
Original file line number Diff line number Diff line change @@ -559,11 +559,6 @@ ZEND_API const char *get_active_function_name(void) /* {{{ */
559
559
}
560
560
/* }}} */
561
561
562
- ZEND_API zend_function * zend_active_function (void )
563
- {
564
- return zend_active_function_ex (EG (current_execute_data ));
565
- }
566
-
567
562
ZEND_API zend_function * zend_active_function_ex (zend_execute_data * execute_data )
568
563
{
569
564
ZEND_ASSERT (zend_is_executing ());
You can’t perform that action at this time.
0 commit comments