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

@@ -47,16 +47,18 @@ b_result b_class_instantiate(
out->c_magic = B_CLASS_MAGIC;
out->c_type = type;
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 *class_data = (char *)out + comp->c_class_data_offset;
if (class_info->t_class_init) {
class_info->t_class_init(out, class_data);
}
entry = b_queue_next(entry);
}
*out_class = out;