core: object: remove legacy iterator interface usage

This commit is contained in:
2025-10-29 14:31:09 +00:00
parent 1e4b5bc4e6
commit 2ee2f8c115
4 changed files with 19 additions and 12 deletions

View File

@@ -33,10 +33,10 @@ b_result b_object_instantiate(
out->obj_type = type;
out->obj_ref = 1;
b_queue_iterator q_it;
b_queue_foreach (&q_it, &type->r_class_hierarchy) {
struct b_queue_entry *entry = b_queue_first(&type->r_class_hierarchy);
while (entry) {
struct b_type_component *comp
= b_unbox(struct b_type_component, q_it.entry, c_entry);
= b_unbox(struct b_type_component, entry, c_entry);
const struct b_type_info *class_info = comp->c_type->r_info;
void *private_data
= (char *)out + comp->c_instance_private_data_offset;
@@ -49,6 +49,8 @@ b_result b_object_instantiate(
out->obj_main_priv_offset
= comp->c_instance_private_data_offset;
}
entry = b_queue_next(entry);
}
*out_object = out;