@@ -2978,9 +2978,9 @@ static void zend_do_traits_property_binding(zend_class_entry *ce, zend_class_ent
2978
2978
zend_function * * hooks = new_prop -> hooks =
2979
2979
zend_arena_alloc (& CG (arena ), ZEND_PROPERTY_HOOK_STRUCT_SIZE );
2980
2980
memcpy (hooks , property_info -> hooks , ZEND_PROPERTY_HOOK_STRUCT_SIZE );
2981
- for (uint32_t i = 0 ; i < ZEND_PROPERTY_HOOK_COUNT ; i ++ ) {
2982
- if (hooks [i ]) {
2983
- zend_function * old_fn = hooks [i ];
2981
+ for (uint32_t j = 0 ; j < ZEND_PROPERTY_HOOK_COUNT ; j ++ ) {
2982
+ if (hooks [j ]) {
2983
+ zend_function * old_fn = hooks [j ];
2984
2984
2985
2985
/* Hooks are not yet supported for internal properties. */
2986
2986
ZEND_ASSERT (ZEND_USER_CODE (old_fn -> type ));
@@ -2995,7 +2995,7 @@ static void zend_do_traits_property_binding(zend_class_entry *ce, zend_class_ent
2995
2995
2996
2996
zend_fixup_trait_method (new_fn , ce );
2997
2997
2998
- hooks [i ] = new_fn ;
2998
+ hooks [j ] = new_fn ;
2999
2999
}
3000
3000
}
3001
3001
ce -> ce_flags |= ZEND_ACC_USE_GUARDS ;
@@ -3343,10 +3343,8 @@ static zend_op_array *zend_lazy_method_load(
3343
3343
3344
3344
static zend_class_entry * zend_lazy_class_load (zend_class_entry * pce )
3345
3345
{
3346
- zend_class_entry * ce ;
3347
- Bucket * p , * end ;
3346
+ zend_class_entry * ce = zend_arena_alloc (& CG (arena ), sizeof (zend_class_entry ));
3348
3347
3349
- ce = zend_arena_alloc (& CG (arena ), sizeof (zend_class_entry ));
3350
3348
memcpy (ce , pce , sizeof (zend_class_entry ));
3351
3349
ce -> ce_flags &= ~ZEND_ACC_IMMUTABLE ;
3352
3350
ce -> refcount = 1 ;
@@ -3372,11 +3370,11 @@ static zend_class_entry *zend_lazy_class_load(zend_class_entry *pce)
3372
3370
/* methods */
3373
3371
ce -> function_table .pDestructor = ZEND_FUNCTION_DTOR ;
3374
3372
if (!(HT_FLAGS (& ce -> function_table ) & HASH_FLAG_UNINITIALIZED )) {
3375
- p = emalloc (HT_SIZE (& ce -> function_table ));
3373
+ Bucket * p = emalloc (HT_SIZE (& ce -> function_table ));
3376
3374
memcpy (p , HT_GET_DATA_ADDR (& ce -> function_table ), HT_USED_SIZE (& ce -> function_table ));
3377
3375
HT_SET_DATA_ADDR (& ce -> function_table , p );
3378
3376
p = ce -> function_table .arData ;
3379
- end = p + ce -> function_table .nNumUsed ;
3377
+ const Bucket * end = p + ce -> function_table .nNumUsed ;
3380
3378
for (; p != end ; p ++ ) {
3381
3379
zend_op_array * op_array = Z_PTR (p -> val );
3382
3380
zend_op_array * new_op_array = Z_PTR (p -> val ) = zend_lazy_method_load (op_array , ce , pce );
@@ -3412,11 +3410,11 @@ static zend_class_entry *zend_lazy_class_load(zend_class_entry *pce)
3412
3410
3413
3411
/* properties_info */
3414
3412
if (!(HT_FLAGS (& ce -> properties_info ) & HASH_FLAG_UNINITIALIZED )) {
3415
- p = emalloc (HT_SIZE (& ce -> properties_info ));
3413
+ Bucket * p = emalloc (HT_SIZE (& ce -> properties_info ));
3416
3414
memcpy (p , HT_GET_DATA_ADDR (& ce -> properties_info ), HT_USED_SIZE (& ce -> properties_info ));
3417
3415
HT_SET_DATA_ADDR (& ce -> properties_info , p );
3418
3416
p = ce -> properties_info .arData ;
3419
- end = p + ce -> properties_info .nNumUsed ;
3417
+ const Bucket * end = p + ce -> properties_info .nNumUsed ;
3420
3418
for (; p != end ; p ++ ) {
3421
3419
zend_property_info * prop_info , * new_prop_info ;
3422
3420
@@ -3448,11 +3446,11 @@ static zend_class_entry *zend_lazy_class_load(zend_class_entry *pce)
3448
3446
3449
3447
/* constants table */
3450
3448
if (!(HT_FLAGS (& ce -> constants_table ) & HASH_FLAG_UNINITIALIZED )) {
3451
- p = emalloc (HT_SIZE (& ce -> constants_table ));
3449
+ Bucket * p = emalloc (HT_SIZE (& ce -> constants_table ));
3452
3450
memcpy (p , HT_GET_DATA_ADDR (& ce -> constants_table ), HT_USED_SIZE (& ce -> constants_table ));
3453
3451
HT_SET_DATA_ADDR (& ce -> constants_table , p );
3454
3452
p = ce -> constants_table .arData ;
3455
- end = p + ce -> constants_table .nNumUsed ;
3453
+ const Bucket * end = p + ce -> constants_table .nNumUsed ;
3456
3454
for (; p != end ; p ++ ) {
3457
3455
zend_class_constant * c , * new_c ;
3458
3456
0 commit comments