Add "final" class attribute

A "final" class is a leaf node in a derivable type hierarchy, and cannot
be derived any further.

This matches the changes in libgobject that introduced G_TYPE_FLAG_FINAL
to the type flags.
This commit is contained in:
Emmanuele Bassi
2021-02-09 11:38:27 +00:00
committed by Emmanuele Bassi
parent ce4448f9e7
commit d127fc1136
8 changed files with 54 additions and 3 deletions

View File

@@ -988,6 +988,7 @@ write_object_info (const gchar *namespace,
gboolean deprecated;
gboolean is_abstract;
gboolean is_fundamental;
gboolean is_final;
GIObjectInfo *pnode;
GIStructInfo *class_struct;
gint i;
@@ -996,6 +997,7 @@ write_object_info (const gchar *namespace,
deprecated = g_base_info_is_deprecated ((GIBaseInfo *)info);
is_abstract = g_object_info_get_abstract (info);
is_fundamental = g_object_info_get_fundamental (info);
is_final = g_object_info_get_final (info);
type_name = g_registered_type_info_get_type_name ((GIRegisteredTypeInfo*)info);
type_init = g_registered_type_info_get_type_init ((GIRegisteredTypeInfo*)info);
@@ -1019,6 +1021,9 @@ write_object_info (const gchar *namespace,
if (is_abstract)
xml_printf (file, " abstract=\"1\"");
if (is_final)
xml_printf (file, " final=\"1\"");
xml_printf (file, " glib:type-name=\"%s\" glib:get-type=\"%s\"", type_name, type_init);
if (is_fundamental)