@@ -480,15 +480,15 @@ ZEND_API bool ZEND_FASTCALL zend_parse_arg_class(zval *arg, zend_class_entry **p
480480/* }}} */
481481
482482static ZEND_COLD bool zend_null_arg_deprecated (const char * fallback_type , uint32_t arg_num ) {
483- zend_function * func = zend_active_function ();
483+ const zend_function * func = zend_active_function ();
484484 ZEND_ASSERT (arg_num > 0 );
485485 uint32_t arg_offset = arg_num - 1 ;
486486 if (arg_offset >= func -> common .num_args ) {
487487 ZEND_ASSERT (func -> common .fn_flags & ZEND_ACC_VARIADIC );
488488 arg_offset = func -> common .num_args ;
489489 }
490490
491- zend_arg_info * arg_info = & func -> common .arg_info [arg_offset ];
491+ const zend_arg_info * arg_info = & func -> common .arg_info [arg_offset ];
492492 zend_string * func_name = get_active_function_or_method_name ();
493493 const char * arg_name = get_active_function_arg_name (arg_num );
494494
@@ -1118,7 +1118,7 @@ ZEND_API zend_result zend_parse_parameter(int flags, uint32_t arg_num, zval *arg
11181118}
11191119
11201120static ZEND_COLD void zend_parse_parameters_debug_error (const char * msg ) {
1121- zend_function * active_function = EG (current_execute_data )-> func ;
1121+ const zend_function * active_function = EG (current_execute_data )-> func ;
11221122 const char * class_name = active_function -> common .scope
11231123 ? ZSTR_VAL (active_function -> common .scope -> name ) : "" ;
11241124 zend_error_noreturn (E_CORE_ERROR , "%s%s%s(): %s" ,
@@ -3681,12 +3681,12 @@ ZEND_API void zend_disable_functions(const char *function_list) /* {{{ */
36813681}
36823682/* }}} */
36833683
3684- static zend_always_inline zend_class_entry * get_scope (zend_execute_data * frame )
3684+ static zend_always_inline zend_class_entry * get_scope (const zend_execute_data * frame )
36853685{
36863686 return frame && frame -> func ? frame -> func -> common .scope : NULL ;
36873687}
36883688
3689- static bool zend_is_callable_check_class (zend_string * name , zend_class_entry * scope , zend_execute_data * frame , zend_fcall_info_cache * fcc , bool * strict_class , char * * error , bool suppress_deprecation ) /* {{{ */
3689+ static bool zend_is_callable_check_class (zend_string * name , zend_class_entry * scope , const zend_execute_data * frame , zend_fcall_info_cache * fcc , bool * strict_class , char * * error , bool suppress_deprecation ) /* {{{ */
36903690{
36913691 bool ret = false;
36923692 zend_class_entry * ce ;
@@ -3790,7 +3790,7 @@ ZEND_API void zend_release_fcall_info_cache(zend_fcall_info_cache *fcc) {
37903790 }
37913791}
37923792
3793- static zend_always_inline bool zend_is_callable_check_func (zval * callable , zend_execute_data * frame , zend_fcall_info_cache * fcc , bool strict_class , char * * error , bool suppress_deprecation ) /* {{{ */
3793+ static zend_always_inline bool zend_is_callable_check_func (zval * callable , const zend_execute_data * frame , zend_fcall_info_cache * fcc , bool strict_class , char * * error , bool suppress_deprecation ) /* {{{ */
37943794{
37953795 zend_class_entry * ce_org = fcc -> calling_scope ;
37963796 bool retval = false;
@@ -4036,7 +4036,7 @@ static zend_always_inline bool zend_is_callable_check_func(zval *callable, zend_
40364036}
40374037/* }}} */
40384038
4039- ZEND_API zend_string * zend_get_callable_name_ex (zval * callable , zend_object * object ) /* {{{ */
4039+ ZEND_API zend_string * zend_get_callable_name_ex (zval * callable , const zend_object * object ) /* {{{ */
40404040{
40414041try_again :
40424042 switch (Z_TYPE_P (callable )) {
@@ -4070,7 +4070,7 @@ ZEND_API zend_string *zend_get_callable_name_ex(zval *callable, zend_object *obj
40704070 }
40714071 case IS_OBJECT :
40724072 {
4073- zend_class_entry * ce = Z_OBJCE_P (callable );
4073+ const zend_class_entry * ce = Z_OBJCE_P (callable );
40744074
40754075 if (ce == zend_ce_closure ) {
40764076 const zend_function * fn = zend_get_closure_method_def (Z_OBJ_P (callable ));
@@ -4101,7 +4101,7 @@ ZEND_API zend_string *zend_get_callable_name(zval *callable) /* {{{ */
41014101/* }}} */
41024102
41034103ZEND_API bool zend_is_callable_at_frame (
4104- zval * callable , zend_object * object , zend_execute_data * frame ,
4104+ zval * callable , zend_object * object , const zend_execute_data * frame ,
41054105 uint32_t check_flags , zend_fcall_info_cache * fcc , char * * error ) /* {{{ */
41064106{
41074107 bool ret ;
@@ -4214,7 +4214,7 @@ ZEND_API bool zend_is_callable_at_frame(
42144214ZEND_API bool zend_is_callable_ex (zval * callable , zend_object * object , uint32_t check_flags , zend_string * * callable_name , zend_fcall_info_cache * fcc , char * * error ) /* {{{ */
42154215{
42164216 /* Determine callability at the first parent user frame. */
4217- zend_execute_data * frame = EG (current_execute_data );
4217+ const zend_execute_data * frame = EG (current_execute_data );
42184218 while (frame && (!frame -> func || !ZEND_USER_CODE (frame -> func -> type ))) {
42194219 frame = frame -> prev_execute_data ;
42204220 }
@@ -5274,7 +5274,7 @@ static zend_string *try_parse_string(const char *str, size_t len, char quote) {
52745274}
52755275
52765276ZEND_API zend_result zend_get_default_from_internal_arg_info (
5277- zval * default_value_zval , zend_internal_arg_info * arg_info )
5277+ zval * default_value_zval , const zend_internal_arg_info * arg_info )
52785278{
52795279 const char * default_value = arg_info -> default_value ;
52805280 if (!default_value ) {
0 commit comments