@@ -1284,8 +1284,11 @@ ZEND_API void zend_merge_properties(zval *obj, HashTable *properties) /* {{{ */
12841284 zend_string * key ;
12851285 zval * value ;
12861286
1287+ if (HT_IS_PACKED (properties )) {
1288+ return ;
1289+ }
12871290 EG (fake_scope ) = Z_OBJCE_P (obj );
1288- ZEND_HASH_FOREACH_STR_KEY_VAL (properties , key , value ) {
1291+ ZEND_HASH_MAP_FOREACH_STR_KEY_VAL (properties , key , value ) {
12891292 if (key ) {
12901293 write_property (zobj , key , value , NULL );
12911294 }
@@ -1321,7 +1324,7 @@ ZEND_API HashTable *zend_separate_class_constants_table(zend_class_entry *class_
13211324 zend_hash_init (constants_table , zend_hash_num_elements (& class_type -> constants_table ), NULL , NULL , 0 );
13221325 zend_hash_extend (constants_table , zend_hash_num_elements (& class_type -> constants_table ), 0 );
13231326
1324- ZEND_HASH_FOREACH_STR_KEY_PTR (& class_type -> constants_table , key , c ) {
1327+ ZEND_HASH_MAP_FOREACH_STR_KEY_PTR (& class_type -> constants_table , key , c ) {
13251328 if (Z_TYPE (c -> value ) == IS_CONSTANT_AST ) {
13261329 new_c = zend_arena_alloc (& CG (arena ), sizeof (zend_class_constant ));
13271330 memcpy (new_c , c , sizeof (zend_class_constant ));
@@ -1409,7 +1412,7 @@ ZEND_API zend_result zend_update_class_constants(zend_class_entry *class_type) /
14091412 } else {
14101413 constants_table = & class_type -> constants_table ;
14111414 }
1412- ZEND_HASH_FOREACH_PTR (constants_table , c ) {
1415+ ZEND_HASH_MAP_FOREACH_PTR (constants_table , c ) {
14131416 if (Z_TYPE (c -> value ) == IS_CONSTANT_AST ) {
14141417 val = & c -> value ;
14151418 if (UNEXPECTED (zval_update_constant_ex (val , c -> ce ) != SUCCESS )) {
@@ -1461,7 +1464,7 @@ ZEND_API zend_result zend_update_class_constants(zend_class_entry *class_type) /
14611464 }
14621465
14631466 if (class_type -> default_static_members_count ) {
1464- ZEND_HASH_FOREACH_PTR (& class_type -> properties_info , prop_info ) {
1467+ ZEND_HASH_MAP_FOREACH_PTR (& class_type -> properties_info , prop_info ) {
14651468 if (prop_info -> flags & ZEND_ACC_STATIC ) {
14661469 val = static_members_table + prop_info -> offset ;
14671470 if (Z_TYPE_P (val ) == IS_CONSTANT_AST
@@ -1526,7 +1529,7 @@ ZEND_API void object_properties_init_ex(zend_object *object, HashTable *properti
15261529 zend_string * key ;
15271530 zend_property_info * property_info ;
15281531
1529- ZEND_HASH_FOREACH_STR_KEY_VAL (properties , key , prop ) {
1532+ ZEND_HASH_MAP_FOREACH_STR_KEY_VAL (properties , key , prop ) {
15301533 property_info = zend_get_property_info (object -> ce , key , 1 );
15311534 if (property_info != ZEND_WRONG_PROPERTY_INFO &&
15321535 property_info &&
@@ -2243,7 +2246,7 @@ ZEND_API void zend_collect_module_handlers(void) /* {{{ */
22432246 int class_count = 0 ;
22442247
22452248 /* Collect extensions with request startup/shutdown handlers */
2246- ZEND_HASH_FOREACH_PTR (& module_registry , module ) {
2249+ ZEND_HASH_MAP_FOREACH_PTR (& module_registry , module ) {
22472250 if (module -> request_startup_func ) {
22482251 startup_count ++ ;
22492252 }
@@ -2266,7 +2269,7 @@ ZEND_API void zend_collect_module_handlers(void) /* {{{ */
22662269 module_post_deactivate_handlers [post_deactivate_count ] = NULL ;
22672270 startup_count = 0 ;
22682271
2269- ZEND_HASH_FOREACH_PTR (& module_registry , module ) {
2272+ ZEND_HASH_MAP_FOREACH_PTR (& module_registry , module ) {
22702273 if (module -> request_startup_func ) {
22712274 module_request_startup_handlers [startup_count ++ ] = module ;
22722275 }
@@ -2279,7 +2282,7 @@ ZEND_API void zend_collect_module_handlers(void) /* {{{ */
22792282 } ZEND_HASH_FOREACH_END ();
22802283
22812284 /* Collect internal classes with static members */
2282- ZEND_HASH_FOREACH_PTR (CG (class_table ), ce ) {
2285+ ZEND_HASH_MAP_FOREACH_PTR (CG (class_table ), ce ) {
22832286 if (ce -> type == ZEND_INTERNAL_CLASS &&
22842287 ce -> default_static_members_count > 0 ) {
22852288 class_count ++ ;
@@ -2292,7 +2295,7 @@ ZEND_API void zend_collect_module_handlers(void) /* {{{ */
22922295 class_cleanup_handlers [class_count ] = NULL ;
22932296
22942297 if (class_count ) {
2295- ZEND_HASH_FOREACH_PTR (CG (class_table ), ce ) {
2298+ ZEND_HASH_MAP_FOREACH_PTR (CG (class_table ), ce ) {
22962299 if (ce -> type == ZEND_INTERNAL_CLASS &&
22972300 ce -> default_static_members_count > 0 ) {
22982301 class_cleanup_handlers [-- class_count ] = ce ;
@@ -2981,7 +2984,7 @@ ZEND_API void zend_deactivate_modules(void) /* {{{ */
29812984 if (EG (full_tables_cleanup )) {
29822985 zend_module_entry * module ;
29832986
2984- ZEND_HASH_REVERSE_FOREACH_PTR (& module_registry , module ) {
2987+ ZEND_HASH_MAP_REVERSE_FOREACH_PTR (& module_registry , module ) {
29852988 if (module -> request_shutdown_func ) {
29862989 zend_try {
29872990 module -> request_shutdown_func (module -> type , module -> module_number );
@@ -3009,20 +3012,20 @@ ZEND_API void zend_post_deactivate_modules(void) /* {{{ */
30093012 zval * zv ;
30103013 zend_string * key ;
30113014
3012- ZEND_HASH_FOREACH_PTR (& module_registry , module ) {
3015+ ZEND_HASH_MAP_FOREACH_PTR (& module_registry , module ) {
30133016 if (module -> post_deactivate_func ) {
30143017 module -> post_deactivate_func ();
30153018 }
30163019 } ZEND_HASH_FOREACH_END ();
3017- ZEND_HASH_REVERSE_FOREACH_STR_KEY_VAL (& module_registry , key , zv ) {
3020+ ZEND_HASH_MAP_REVERSE_FOREACH_STR_KEY_VAL (& module_registry , key , zv ) {
30183021 module = Z_PTR_P (zv );
30193022 if (module -> type != MODULE_TEMPORARY ) {
30203023 break ;
30213024 }
30223025 module_destructor (module );
30233026 free (module );
30243027 zend_string_release_ex (key , 0 );
3025- } ZEND_HASH_FOREACH_END_DEL ();
3028+ } ZEND_HASH_MAP_FOREACH_END_DEL ();
30263029 } else {
30273030 zend_module_entry * * p = module_post_deactivate_handlers ;
30283031
@@ -3267,14 +3270,14 @@ ZEND_API zend_result zend_disable_class(const char *class_name, size_t class_nam
32673270 INIT_CLASS_ENTRY_INIT_METHODS ((* disabled_class ), disabled_class_new );
32683271 disabled_class -> create_object = display_disabled_class ;
32693272
3270- ZEND_HASH_FOREACH_PTR (& disabled_class -> function_table , fn ) {
3273+ ZEND_HASH_MAP_FOREACH_PTR (& disabled_class -> function_table , fn ) {
32713274 if ((fn -> common .fn_flags & (ZEND_ACC_HAS_RETURN_TYPE |ZEND_ACC_HAS_TYPE_HINTS )) &&
32723275 fn -> common .scope == disabled_class ) {
32733276 zend_free_internal_arg_info (& fn -> internal_function );
32743277 }
32753278 } ZEND_HASH_FOREACH_END ();
32763279 zend_hash_clean (& disabled_class -> function_table );
3277- ZEND_HASH_FOREACH_PTR (& disabled_class -> properties_info , prop ) {
3280+ ZEND_HASH_MAP_FOREACH_PTR (& disabled_class -> properties_info , prop ) {
32783281 if (prop -> ce == disabled_class ) {
32793282 zend_string_release (prop -> name );
32803283 zend_type_release (prop -> type , /* persistent */ 1 );
0 commit comments