core: type: fix interface type components not being initialised properly
This commit is contained in:
@@ -142,7 +142,7 @@ static b_result locate_interface(
|
|||||||
struct b_type_registration *interface_reg
|
struct b_type_registration *interface_reg
|
||||||
= get_type(&type_list, interface_id);
|
= get_type(&type_list, interface_id);
|
||||||
if (!interface_reg) {
|
if (!interface_reg) {
|
||||||
return B_RESULT_ERR(NO_MEMORY);
|
return B_RESULT_ERR(NO_ENTRY);
|
||||||
}
|
}
|
||||||
|
|
||||||
interface_comp = create_type_component(interface_reg);
|
interface_comp = create_type_component(interface_reg);
|
||||||
@@ -150,6 +150,8 @@ static b_result locate_interface(
|
|||||||
return B_RESULT_ERR(NO_MEMORY);
|
return B_RESULT_ERR(NO_MEMORY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
initialise_type_component(interface_comp, interface_reg->r_info, init_ctx);
|
||||||
|
|
||||||
put_type_component(&dest->r_components, interface_comp);
|
put_type_component(&dest->r_components, interface_comp);
|
||||||
return B_RESULT_SUCCESS;
|
return B_RESULT_SUCCESS;
|
||||||
}
|
}
|
||||||
@@ -211,6 +213,7 @@ static b_result find_type_components(struct b_type_registration *reg)
|
|||||||
/* circular class dependency */
|
/* circular class dependency */
|
||||||
// result = B_RESULT_ERR(INVALID_ARGUMENT);
|
// result = B_RESULT_ERR(INVALID_ARGUMENT);
|
||||||
// break;
|
// break;
|
||||||
|
current_id = &dep_class->r_info->t_parent_id;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -245,6 +248,7 @@ static b_result find_type_components(struct b_type_registration *reg)
|
|||||||
comp = b_unbox(struct b_type_component, node, c_node);
|
comp = b_unbox(struct b_type_component, node, c_node);
|
||||||
if (comp->c_type->r_category == B_TYPE_CLASS) {
|
if (comp->c_type->r_category == B_TYPE_CLASS) {
|
||||||
/* this component was already initialised above */
|
/* this component was already initialised above */
|
||||||
|
node = b_btree_next(node);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user