@@ -174,7 +174,7 @@ static void string_free(string *str)
174
174
/* Struct for properties */
175
175
typedef struct _property_reference {
176
176
zend_class_entry * ce ;
177
- zend_property_info * prop ;
177
+ zend_property_info prop ;
178
178
} property_reference ;
179
179
180
180
/* Struct for parameters */
@@ -1180,7 +1180,7 @@ static void reflection_property_factory(zend_class_entry *ce, zend_property_info
1180
1180
intern = (reflection_object * ) zend_object_store_get_object (object TSRMLS_CC );
1181
1181
reference = (property_reference * ) emalloc (sizeof (property_reference ));
1182
1182
reference -> ce = ce ;
1183
- reference -> prop = prop ;
1183
+ reference -> prop = * prop ;
1184
1184
intern -> ptr = reference ;
1185
1185
intern -> free_ptr = 1 ;
1186
1186
intern -> ce = ce ;
@@ -3267,7 +3267,7 @@ static int _adddynproperty(zval **pptr, int num_args, va_list args, zend_hash_ke
3267
3267
ZVAL_STRINGL (& member , hash_key -> arKey .s , hash_key -> nKeyLength - 1 , 0 );
3268
3268
}
3269
3269
if (zend_get_property_info (ce , & member , 1 TSRMLS_CC ) == & EG (std_property_info )) {
3270
- ALLOC_ZVAL (property );
3270
+ MAKE_STD_ZVAL (property );
3271
3271
reflection_property_factory (ce , & EG (std_property_info ), property TSRMLS_CC );
3272
3272
add_next_index_zval (retval , property );
3273
3273
}
@@ -3912,7 +3912,7 @@ ZEND_METHOD(reflection_property, __construct)
3912
3912
3913
3913
reference = (property_reference * ) emalloc (sizeof (property_reference ));
3914
3914
reference -> ce = ce ;
3915
- reference -> prop = property_info ;
3915
+ reference -> prop = * property_info ;
3916
3916
intern -> ptr = reference ;
3917
3917
intern -> free_ptr = 1 ;
3918
3918
intern -> ce = ce ;
@@ -3930,7 +3930,7 @@ ZEND_METHOD(reflection_property, __toString)
3930
3930
METHOD_NOTSTATIC_NUMPARAMS (reflection_property_ptr , 0 );
3931
3931
GET_REFLECTION_OBJECT_PTR (ref );
3932
3932
string_init (& str );
3933
- _property_string (& str , ref -> prop , NULL_ZSTR , "" TSRMLS_CC );
3933
+ _property_string (& str , & ref -> prop , NULL_ZSTR , "" TSRMLS_CC );
3934
3934
RETURN_U_STRINGL (ZEND_U_CONVERTER (UG (output_encoding_conv )), str .string , str .len - 1 , ZSTR_AUTOFREE );
3935
3935
}
3936
3936
/* }}} */
@@ -3951,7 +3951,7 @@ static void _property_check_flag(INTERNAL_FUNCTION_PARAMETERS, int mask)
3951
3951
3952
3952
METHOD_NOTSTATIC_NUMPARAMS (reflection_property_ptr , 0 );
3953
3953
GET_REFLECTION_OBJECT_PTR (ref );
3954
- RETURN_BOOL (ref -> prop -> flags & mask );
3954
+ RETURN_BOOL (ref -> prop . flags & mask );
3955
3955
}
3956
3956
3957
3957
/* {{{ proto public bool ReflectionProperty::isPublic() U
@@ -4007,13 +4007,13 @@ ZEND_METHOD(reflection_property, getDefaultValue)
4007
4007
METHOD_NOTSTATIC_NUMPARAMS (reflection_property_ptr , 0 );
4008
4008
GET_REFLECTION_OBJECT_PTR (ref );
4009
4009
4010
- if (ref -> prop -> flags & ZEND_ACC_STATIC ) {
4010
+ if (ref -> prop . flags & ZEND_ACC_STATIC ) {
4011
4011
prop_defaults = & ref -> ce -> default_static_members ;
4012
4012
} else {
4013
4013
prop_defaults = & ref -> ce -> default_properties ;
4014
4014
}
4015
4015
4016
- if (zend_u_hash_quick_find (prop_defaults , utype , ref -> prop -> name , ref -> prop -> name_length + 1 , ref -> prop -> h , (void * * )& zdef ) == SUCCESS ) {
4016
+ if (zend_u_hash_quick_find (prop_defaults , utype , ref -> prop . name , ref -> prop . name_length + 1 , ref -> prop . h , (void * * )& zdef ) == SUCCESS ) {
4017
4017
ALLOC_ZVAL (zv );
4018
4018
* zv = * * zdef ;
4019
4019
zval_copy_ctor (zv );
@@ -4034,7 +4034,7 @@ ZEND_METHOD(reflection_property, getModifiers)
4034
4034
METHOD_NOTSTATIC_NUMPARAMS (reflection_property_ptr , 0 );
4035
4035
GET_REFLECTION_OBJECT_PTR (ref );
4036
4036
4037
- RETURN_LONG (ref -> prop -> flags );
4037
+ RETURN_LONG (ref -> prop . flags );
4038
4038
}
4039
4039
/* }}} */
4040
4040
@@ -4051,26 +4051,26 @@ ZEND_METHOD(reflection_property, getValue)
4051
4051
METHOD_NOTSTATIC (reflection_property_ptr );
4052
4052
GET_REFLECTION_OBJECT_PTR (ref );
4053
4053
4054
- if (!(ref -> prop -> flags & ZEND_ACC_PUBLIC )) {
4054
+ if (!(ref -> prop . flags & ZEND_ACC_PUBLIC )) {
4055
4055
_default_get_entry (getThis (), "name" , sizeof ("name" ), & name TSRMLS_CC );
4056
4056
zend_throw_exception_ex (reflection_exception_ptr , 0 TSRMLS_CC ,
4057
4057
"Cannot access non-public member %v::%v" , intern -> ce -> name , Z_UNIVAL (name ));
4058
4058
zval_dtor (& name );
4059
4059
return ;
4060
4060
}
4061
4061
4062
- if ((ref -> prop -> flags & ZEND_ACC_STATIC )) {
4062
+ if ((ref -> prop . flags & ZEND_ACC_STATIC )) {
4063
4063
zend_update_class_constants (intern -> ce TSRMLS_CC );
4064
- if (zend_u_hash_quick_find (CE_STATIC_MEMBERS (intern -> ce ), utype , ref -> prop -> name , ref -> prop -> name_length + 1 , ref -> prop -> h , (void * * ) & member ) == FAILURE ) {
4065
- zend_error (E_ERROR , "Internal error: Could not find the property %v::%v" , intern -> ce -> name , ref -> prop -> name );
4064
+ if (zend_u_hash_quick_find (CE_STATIC_MEMBERS (intern -> ce ), utype , ref -> prop . name , ref -> prop . name_length + 1 , ref -> prop . h , (void * * ) & member ) == FAILURE ) {
4065
+ zend_error (E_ERROR , "Internal error: Could not find the property %v::%v" , intern -> ce -> name , ref -> prop . name );
4066
4066
/* Bails out */
4067
4067
}
4068
4068
} else {
4069
4069
if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "o" , & object ) == FAILURE ) {
4070
4070
return ;
4071
4071
}
4072
- if (zend_u_hash_quick_find (Z_OBJPROP_P (object ), utype , ref -> prop -> name , ref -> prop -> name_length + 1 , ref -> prop -> h , (void * * ) & member ) == FAILURE ) {
4073
- zend_error (E_ERROR , "Internal error: Could not find the property %v::%v" , intern -> ce -> name , ref -> prop -> name );
4072
+ if (zend_u_hash_quick_find (Z_OBJPROP_P (object ), utype , ref -> prop . name , ref -> prop . name_length + 1 , ref -> prop . h , (void * * ) & member ) == FAILURE ) {
4073
+ zend_error (E_ERROR , "Internal error: Could not find the property %v::%v" , intern -> ce -> name , ref -> prop . name );
4074
4074
/* Bails out */
4075
4075
}
4076
4076
}
@@ -4098,15 +4098,15 @@ ZEND_METHOD(reflection_property, setValue)
4098
4098
METHOD_NOTSTATIC (reflection_property_ptr );
4099
4099
GET_REFLECTION_OBJECT_PTR (ref );
4100
4100
4101
- if (!(ref -> prop -> flags & ZEND_ACC_PUBLIC )) {
4101
+ if (!(ref -> prop . flags & ZEND_ACC_PUBLIC )) {
4102
4102
_default_get_entry (getThis (), "name" , sizeof ("name" ), & name TSRMLS_CC );
4103
4103
zend_throw_exception_ex (reflection_exception_ptr , 0 TSRMLS_CC ,
4104
4104
"Cannot access non-public member %v::%v" , intern -> ce -> name , Z_UNIVAL (name ));
4105
4105
zval_dtor (& name );
4106
4106
return ;
4107
4107
}
4108
4108
4109
- if ((ref -> prop -> flags & ZEND_ACC_STATIC )) {
4109
+ if ((ref -> prop . flags & ZEND_ACC_STATIC )) {
4110
4110
if (zend_parse_parameters_ex (ZEND_PARSE_PARAMS_QUIET , ZEND_NUM_ARGS () TSRMLS_CC , "z" , & value ) == FAILURE ) {
4111
4111
if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "zz" , & tmp , & value ) == FAILURE ) {
4112
4112
return ;
@@ -4121,8 +4121,8 @@ ZEND_METHOD(reflection_property, setValue)
4121
4121
prop_table = Z_OBJPROP_P (object );
4122
4122
}
4123
4123
4124
- if (zend_u_hash_quick_find (prop_table , utype , ref -> prop -> name , ref -> prop -> name_length + 1 , ref -> prop -> h , (void * * ) & variable_ptr ) == FAILURE ) {
4125
- zend_error (E_ERROR , "Internal error: Could not find the property %v::%v" , intern -> ce -> name , ref -> prop -> name );
4124
+ if (zend_u_hash_quick_find (prop_table , utype , ref -> prop . name , ref -> prop . name_length + 1 , ref -> prop . h , (void * * ) & variable_ptr ) == FAILURE ) {
4125
+ zend_error (E_ERROR , "Internal error: Could not find the property %v::%v" , intern -> ce -> name , ref -> prop . name );
4126
4126
/* Bails out */
4127
4127
}
4128
4128
if (* variable_ptr == value ) {
@@ -4145,7 +4145,7 @@ ZEND_METHOD(reflection_property, setValue)
4145
4145
if (PZVAL_IS_REF (value )) {
4146
4146
SEPARATE_ZVAL (& value );
4147
4147
}
4148
- zend_u_hash_quick_update (prop_table , utype , ref -> prop -> name , ref -> prop -> name_length + 1 , ref -> prop -> h , & value , sizeof (zval * ), (void * * ) & foo );
4148
+ zend_u_hash_quick_update (prop_table , utype , ref -> prop . name , ref -> prop . name_length + 1 , ref -> prop . h , & value , sizeof (zval * ), (void * * ) & foo );
4149
4149
}
4150
4150
}
4151
4151
/* }}} */
@@ -4164,7 +4164,7 @@ ZEND_METHOD(reflection_property, getDeclaringClass)
4164
4164
METHOD_NOTSTATIC_NUMPARAMS (reflection_property_ptr , 0 );
4165
4165
GET_REFLECTION_OBJECT_PTR (ref );
4166
4166
4167
- if (zend_u_unmangle_property_name (UG (unicode )?IS_UNICODE :IS_STRING , ref -> prop -> name , ref -> prop -> name_length , & class_name , & prop_name ) != SUCCESS ) {
4167
+ if (zend_u_unmangle_property_name (UG (unicode )?IS_UNICODE :IS_STRING , ref -> prop . name , ref -> prop . name_length , & class_name , & prop_name ) != SUCCESS ) {
4168
4168
RETURN_FALSE ;
4169
4169
}
4170
4170
@@ -4192,8 +4192,8 @@ ZEND_METHOD(reflection_property, getDocComment)
4192
4192
4193
4193
METHOD_NOTSTATIC_NUMPARAMS (reflection_property_ptr , 0 );
4194
4194
GET_REFLECTION_OBJECT_PTR (ref );
4195
- if (ref -> prop -> doc_comment .v ) {
4196
- RETURN_ZSTRL (ZEND_STR_TYPE , ref -> prop -> doc_comment , ref -> prop -> doc_comment_len , 1 );
4195
+ if (ref -> prop . doc_comment .v ) {
4196
+ RETURN_ZSTRL (ZEND_STR_TYPE , ref -> prop . doc_comment , ref -> prop . doc_comment_len , 1 );
4197
4197
}
4198
4198
RETURN_FALSE ;
4199
4199
}
0 commit comments