diff options
Diffstat (limited to 'girepository/giobjectinfo.c')
-rw-r--r-- | girepository/giobjectinfo.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/girepository/giobjectinfo.c b/girepository/giobjectinfo.c index 13cfdaa8..2042793a 100644 --- a/girepository/giobjectinfo.c +++ b/girepository/giobjectinfo.c @@ -134,6 +134,31 @@ g_object_info_get_abstract (GIObjectInfo *info) } /** + * g_object_info_get_final: + * @info: a #GIObjectInfo + * + * Checks whether the object type is a final type, i.e. if it cannot + * be derived + * + * Returns: %TRUE if the object type is final + * + * Since: 1.70 + */ +gboolean +g_object_info_get_final (GIObjectInfo *info) +{ + GIRealInfo *rinfo = (GIRealInfo *) info; + ObjectBlob *blob; + + g_return_val_if_fail (info != NULL, FALSE); + g_return_val_if_fail (GI_IS_OBJECT_INFO (info), FALSE); + + blob = (ObjectBlob *) &rinfo->typelib->data[rinfo->offset]; + + return blob->final_ != 0; +} + +/** * g_object_info_get_fundamental: * @info: a #GIObjectInfo * |