if not curnodes:
return None
found = True
+ #print "LOOKING %d nodes" % (len(curnodes), )
for node in curnodes:
+ #print "LOOKING: %r expecting: %r attrib: %r" \
+ # % (node, exp_attrs, node.attrib)
passes = True
- for (name, val) in exp_attrs:
+ for name, val in exp_attrs:
a = node.attrib.get(name)
if not a or a != val:
+ #print "ATTR FAIL: %r=%r" % (val, a)
passes = False
break
if passes:
else
g_fprintf (file, "%s", "none");
}
- else if (tag < 20)
+ else if (tag < GI_TYPE_TAG_ARRAY)
g_fprintf (file, "%s", basic[tag]);
- else if (tag == 20)
+ else if (tag == GI_TYPE_TAG_ARRAY)
{
gint length;
g_fprintf (file, "]");
g_base_info_unref ((GIBaseInfo *)type);
}
- else if (tag == 21)
+ else if (tag == GI_TYPE_TAG_INTERFACE)
{
GIBaseInfo *iface = g_type_info_get_interface (info);
write_type_name (namespace, iface, file);
g_base_info_unref (iface);
}
- else if (tag == 22)
+ else if (tag == GI_TYPE_TAG_GLIST)
{
type = g_type_info_get_param_type (info, 0);
g_fprintf (file, "GLib.List");
g_base_info_unref ((GIBaseInfo *)type);
}
}
- else if (tag == 23)
+ else if (tag == GI_TYPE_TAG_GSLIST)
{
type = g_type_info_get_param_type (info, 0);
g_fprintf (file, "GLib.SList");
g_base_info_unref ((GIBaseInfo *)type);
}
}
- else if (tag == 24)
+ else if (tag == GI_TYPE_TAG_GHASH)
{
type = g_type_info_get_param_type (info, 0);
g_fprintf (file, "GLib.HashTable");
g_base_info_unref ((GIBaseInfo *)type);
}
}
- else if (tag == 25)
+ else if (tag == GI_TYPE_TAG_ERROR)
{
gint n;
}
}
else
- g_assert_not_reached ();
+ {
+ g_printerr ("Unhandled type tag %d\n", tag);
+ g_assert_not_reached ();
+ }
}
static void