scanner: Rename g_irepository_dump when included from the dumper
authorBenjamin Otte <otte@redhat.com>
Tue, 11 Jan 2011 13:26:29 +0000 (14:26 +0100)
committerBenjamin Otte <otte@redhat.com>
Tue, 11 Jan 2011 14:11:05 +0000 (15:11 +0100)
This avoids a naming conflict when compiling GiRepository.gir, where
g_irepository_dump() was defined in an included header.

girepository/gdump.c
giscanner/dumper.py

index cdede61..1b9ffd4 100644 (file)
@@ -381,10 +381,12 @@ dump_type (GType type, const char *symbol, GOutputStream *out)
  * Returns: %TRUE on success, %FALSE on error
  */
 #ifndef G_IREPOSITORY_COMPILATION
-static
-#endif
+static gboolean
+dump_irepository (const char *arg, GError **error)
+#else
 gboolean
 g_irepository_dump (const char *arg, GError **error)
+#endif
 {
   GHashTable *output_types;
   char **args;
index 36a8807..fcc0002 100644 (file)
@@ -58,7 +58,7 @@ main(int argc, char **argv)
       exit (1);
     }
 
-  if (!g_irepository_dump (argv[1] + strlen(introspect_dump_prefix), &error))
+  if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
     {
       g_printerr ("%%s\\n", error->message);
       exit (1);