loci: add a function to determine whether a class is an inheritance root
diff --git a/c_gen/c_show_gen.py b/c_gen/c_show_gen.py
index 9d84477..91eb595 100644
--- a/c_gen/c_show_gen.py
+++ b/c_gen/c_show_gen.py
@@ -91,7 +91,7 @@
for cls in of_g.standard_class_order:
if not loxi_utils.class_in_version(cls, version):
continue
- if cls in type_maps.inheritance_map:
+ if type_maps.class_is_inheritance_root(cls):
continue
out.write("""\
int %(cls)s_%(ver_name)s_show(loci_writer_f writer, void* cookie, %(cls)s_t *obj);
@@ -130,7 +130,7 @@
for cls in of_g.standard_class_order:
if not loxi_utils.class_in_version(cls, version):
continue
- if cls in type_maps.inheritance_map:
+ if type_maps.class_is_inheritance_root(cls):
continue
out.write("""
int
@@ -233,7 +233,7 @@
comma = ","
if (not loxi_utils.class_in_version(cls, version) or
- cls in type_maps.inheritance_map):
+ type_maps.class_is_inheritance_root(cls)):
out.write(" unknown_show%s\n" % comma);
else:
out.write(" %s_%s_show%s\n" %