Add check to make sure we're not hitting out unresolved types
authorColin Walters <walters@src.gnome.org>
Fri, 19 Sep 2008 16:16:18 +0000 (16:16 +0000)
committerColin Walters <walters@src.gnome.org>
Fri, 19 Sep 2008 16:16:18 +0000 (16:16 +0000)
svn path=/trunk/; revision=616

tools/generate.c

index c63acdc..01f4776 100644 (file)
@@ -34,6 +34,16 @@ static gchar *output = NULL;
 gchar **includedirs = NULL;
 
 static void 
+check_unresolved (GIBaseInfo *info)
+{
+  if (g_base_info_get_type (info) != GI_INFO_TYPE_UNRESOLVED)
+    return;
+
+  g_critical ("Found unresolved type '%s' '%s'\n", 
+             g_base_info_get_name (info), g_base_info_get_namespace (info));
+}
+
+static void 
 write_type_name (const gchar *namespace,
                 GIBaseInfo  *info,
                 FILE        *file)
@@ -77,6 +87,8 @@ write_type_info (const gchar *namespace,
     "filename"
   };
 
+  check_unresolved ((GIBaseInfo*)info);
+
   tag = g_type_info_get_tag (info);
   is_pointer = g_type_info_is_pointer (info);