@@ -2713,8 +2713,8 @@ ZEND_END_ARG_INFO()
2713
2713
ZEND_API zend_result zend_register_functions (zend_class_entry * scope , const zend_function_entry * functions , HashTable * function_table , int type ) /* {{{ */
2714
2714
{
2715
2715
const zend_function_entry * ptr = functions ;
2716
- zend_function function , * reg_function ;
2717
- zend_internal_function * internal_function = (zend_internal_function * )& function ;
2716
+ zend_function function ;
2717
+ zend_internal_function * reg_function , * internal_function = (zend_internal_function * )& function ;
2718
2718
int count = 0 , unload = 0 ;
2719
2719
HashTable * target_function_table = function_table ;
2720
2720
int error_type ;
@@ -2847,23 +2847,23 @@ ZEND_API zend_result zend_register_functions(zend_class_entry *scope, const zend
2847
2847
}
2848
2848
2849
2849
/* Get parameter count including variadic parameter. */
2850
- uint32_t num_args = reg_function -> common . num_args ;
2851
- if (reg_function -> common . fn_flags & ZEND_ACC_VARIADIC ) {
2850
+ uint32_t num_args = reg_function -> num_args ;
2851
+ if (reg_function -> fn_flags & ZEND_ACC_VARIADIC ) {
2852
2852
num_args ++ ;
2853
2853
}
2854
2854
2855
2855
/* If types of arguments have to be checked */
2856
- if (reg_function -> common . arg_info && num_args ) {
2856
+ if (reg_function -> arg_info && num_args ) {
2857
2857
uint32_t i ;
2858
2858
for (i = 0 ; i < num_args ; i ++ ) {
2859
- zend_internal_arg_info * arg_info = & reg_function -> internal_function . arg_info [i ];
2859
+ zend_internal_arg_info * arg_info = & reg_function -> arg_info [i ];
2860
2860
ZEND_ASSERT (arg_info -> name && "Parameter must have a name" );
2861
2861
if (ZEND_TYPE_IS_SET (arg_info -> type )) {
2862
- reg_function -> common . fn_flags |= ZEND_ACC_HAS_TYPE_HINTS ;
2862
+ reg_function -> fn_flags |= ZEND_ACC_HAS_TYPE_HINTS ;
2863
2863
}
2864
2864
#if ZEND_DEBUG
2865
2865
for (uint32_t j = 0 ; j < i ; j ++ ) {
2866
- if (!strcmp (arg_info -> name , reg_function -> internal_function . arg_info [j ].name )) {
2866
+ if (!strcmp (arg_info -> name , reg_function -> arg_info [j ].name )) {
2867
2867
zend_error_noreturn (E_CORE_ERROR ,
2868
2868
"Duplicate parameter name $%s for function %s%s%s()" , arg_info -> name ,
2869
2869
scope ? ZSTR_VAL (scope -> name ) : "" , scope ? "::" : "" , ptr -> fname );
@@ -2874,18 +2874,18 @@ ZEND_API zend_result zend_register_functions(zend_class_entry *scope, const zend
2874
2874
}
2875
2875
2876
2876
/* Rebuild arginfos if parameter/property types and/or a return type are used */
2877
- if (reg_function -> common . arg_info &&
2878
- (reg_function -> common . fn_flags & (ZEND_ACC_HAS_RETURN_TYPE |ZEND_ACC_HAS_TYPE_HINTS ))) {
2877
+ if (reg_function -> arg_info &&
2878
+ (reg_function -> fn_flags & (ZEND_ACC_HAS_RETURN_TYPE |ZEND_ACC_HAS_TYPE_HINTS ))) {
2879
2879
/* convert "const char*" class type names into "zend_string*" */
2880
2880
uint32_t i ;
2881
- zend_arg_info * arg_info = reg_function -> common . arg_info - 1 ;
2882
- zend_arg_info * new_arg_info ;
2881
+ zend_internal_arg_info * arg_info = reg_function -> arg_info - 1 ;
2882
+ zend_internal_arg_info * new_arg_info ;
2883
2883
2884
2884
/* Treat return type as an extra argument */
2885
2885
num_args ++ ;
2886
- new_arg_info = malloc (sizeof (zend_arg_info ) * num_args );
2887
- memcpy (new_arg_info , arg_info , sizeof (zend_arg_info ) * num_args );
2888
- reg_function -> common . arg_info = new_arg_info + 1 ;
2886
+ new_arg_info = malloc (sizeof (zend_internal_arg_info ) * num_args );
2887
+ memcpy (new_arg_info , arg_info , sizeof (zend_internal_arg_info ) * num_args );
2888
+ reg_function -> arg_info = new_arg_info + 1 ;
2889
2889
for (i = 0 ; i < num_args ; i ++ ) {
2890
2890
if (ZEND_TYPE_IS_COMPLEX (new_arg_info [i ].type )) {
2891
2891
ZEND_ASSERT (ZEND_TYPE_HAS_NAME (new_arg_info [i ].type )
@@ -2939,8 +2939,8 @@ ZEND_API zend_result zend_register_functions(zend_class_entry *scope, const zend
2939
2939
2940
2940
if (scope ) {
2941
2941
zend_check_magic_method_implementation (
2942
- scope , reg_function , lowercase_name , E_CORE_ERROR );
2943
- zend_add_magic_method (scope , reg_function , lowercase_name );
2942
+ scope , ( zend_function * ) reg_function , lowercase_name , E_CORE_ERROR );
2943
+ zend_add_magic_method (scope , ( zend_function * ) reg_function , lowercase_name );
2944
2944
}
2945
2945
ptr ++ ;
2946
2946
count ++ ;
0 commit comments