mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 07:56:17 +01:00
Bug 556434 – unhandled interface/object/... member types
2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi> Bug 556434 – unhandled interface/object/... member types * girepository/girnode.c (g_ir_node_check_unhandled_members, g_ir_node_build_typelib): Check all interface/object/boxed/struct/union members are processed and abort if they are not. (Mostly callbacks in structs, but also fields in interfaces.) svn path=/trunk/; revision=722
This commit is contained in:
parent
7d89fdf643
commit
cab23be329
47
girnode.c
47
girnode.c
@ -1197,6 +1197,33 @@ g_ir_node_build_members (GList **members,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
g_ir_node_check_unhandled_members (GList **members,
|
||||
GIrNodeTypeId container_type)
|
||||
{
|
||||
if (*members)
|
||||
{
|
||||
GList *l;
|
||||
|
||||
for (l = *members; l; l = l->next)
|
||||
{
|
||||
GIrNode *member = (GIrNode *)l->data;
|
||||
|
||||
g_printerr ("Unhandled '%s' member '%s' type '%s'\n",
|
||||
g_ir_node_type_to_string (container_type),
|
||||
member->name,
|
||||
g_ir_node_type_to_string (member->type));
|
||||
}
|
||||
|
||||
g_list_free (*members);
|
||||
*members = NULL;
|
||||
|
||||
/* Commented out for now to not break the build.
|
||||
g_error ("Unhandled members. Aborting.");
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
g_ir_node_build_typelib (GIrNode *node,
|
||||
GIrModule *module,
|
||||
@ -1665,7 +1692,9 @@ g_ir_node_build_typelib (GIrNode *node,
|
||||
module, modules, strings,
|
||||
types, data, offset, offset2);
|
||||
|
||||
g_list_free (members);
|
||||
g_ir_node_check_unhandled_members (&members, node->type);
|
||||
|
||||
g_assert (members == NULL);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1698,7 +1727,9 @@ g_ir_node_build_typelib (GIrNode *node,
|
||||
module, modules, strings,
|
||||
types, data, offset, offset2);
|
||||
|
||||
g_list_free (members);
|
||||
g_ir_node_check_unhandled_members (&members, node->type);
|
||||
|
||||
g_assert (members == NULL);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1755,7 +1786,9 @@ g_ir_node_build_typelib (GIrNode *node,
|
||||
module, modules, strings,
|
||||
types, data, offset, offset2);
|
||||
|
||||
g_list_free (members);
|
||||
g_ir_node_check_unhandled_members (&members, node->type);
|
||||
|
||||
g_assert (members == NULL);
|
||||
|
||||
if (union_->discriminator_type)
|
||||
{
|
||||
@ -1878,7 +1911,9 @@ g_ir_node_build_typelib (GIrNode *node,
|
||||
module, modules, strings,
|
||||
types, data, offset, offset2);
|
||||
|
||||
g_list_free (members);
|
||||
g_ir_node_check_unhandled_members (&members, node->type);
|
||||
|
||||
g_assert (members == NULL);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1936,7 +1971,9 @@ g_ir_node_build_typelib (GIrNode *node,
|
||||
module, modules, strings,
|
||||
types, data, offset, offset2);
|
||||
|
||||
g_list_free (members);
|
||||
g_ir_node_check_unhandled_members (&members, node->type);
|
||||
|
||||
g_assert (members == NULL);
|
||||
}
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user