diff --git a/girepository/tools/generate.c b/girepository/tools/generate.c index 2f6f512eb..efa4e7a74 100644 --- a/girepository/tools/generate.c +++ b/girepository/tools/generate.c @@ -413,15 +413,18 @@ write_struct_info (const gchar *namespace, name = g_base_info_get_name ((GIBaseInfo *)info); deprecated = g_base_info_is_deprecated ((GIBaseInfo *)info); + type_name = g_registered_type_info_get_type_name ((GIRegisteredTypeInfo*)info); + type_init = g_registered_type_info_get_type_init ((GIRegisteredTypeInfo*)info); + if (g_base_info_get_type ((GIBaseInfo *)info) == GI_INFO_TYPE_BOXED) { - type_name = g_registered_type_info_get_type_name ((GIRegisteredTypeInfo*)info); - type_init = g_registered_type_info_get_type_init ((GIRegisteredTypeInfo*)info); - - g_fprintf (file, "