core: type: fix registration of types that extend something other than b_object
This commit is contained in:
@@ -24,10 +24,15 @@ typedef const union b_type {
|
||||
unsigned char b[16];
|
||||
} *b_type;
|
||||
|
||||
typedef enum b_type_flags {
|
||||
B_TYPE_F_ABSTRACT = 0x01u,
|
||||
} b_type_flags;
|
||||
|
||||
typedef struct b_type_info {
|
||||
union b_type t_id;
|
||||
union b_type t_parent_id;
|
||||
const char *t_name;
|
||||
b_type_flags t_flags;
|
||||
union b_type t_interfaces[B_TYPE_MAX_INTERFACES];
|
||||
size_t t_nr_interfaces;
|
||||
size_t t_class_size;
|
||||
|
||||
@@ -208,8 +208,9 @@ static b_result find_type_components(struct b_type_registration *reg)
|
||||
comp = b_type_get_component(®->r_components, current_id);
|
||||
if (comp) {
|
||||
/* circular class dependency */
|
||||
result = B_RESULT_ERR(INVALID_ARGUMENT);
|
||||
break;
|
||||
// result = B_RESULT_ERR(INVALID_ARGUMENT);
|
||||
// break;
|
||||
continue;
|
||||
}
|
||||
|
||||
comp = create_type_component(dep_class);
|
||||
@@ -227,6 +228,8 @@ static b_result find_type_components(struct b_type_registration *reg)
|
||||
if (b_type_id_compare(current_id, B_TYPE_OBJECT) == 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
current_id = &dep_class->r_info->t_parent_id;
|
||||
}
|
||||
|
||||
b_queue_iterator q_it;
|
||||
|
||||
Reference in New Issue
Block a user