[girepository] Remove trailing whitespace
[gnome.gobject-introspection] / girepository / gdump.c
index a58e620..5cb10b0 100644 (file)
@@ -154,7 +154,27 @@ dump_object_type (GType type, const char *symbol, GOutputStream *out)
   escaped_printf (out, "  <class name=\"%s\" get-type=\"%s\"",
                  g_type_name (type), symbol);
   if (type != G_TYPE_OBJECT)
-    escaped_printf (out, " parent=\"%s\"", g_type_name (g_type_parent (type)));
+    {
+      GString *parent_str;
+      GType parent;
+      gboolean first = TRUE;
+
+      parent = type;
+      parent_str = g_string_new ("");
+      do
+        {
+          parent = g_type_parent (parent);
+          if (first)
+            first = FALSE;
+          else
+            g_string_append_c (parent_str, ',');
+          g_string_append (parent_str, g_type_name (parent));
+        } while (parent != G_TYPE_OBJECT && parent != G_TYPE_INVALID);
+
+      escaped_printf (out, " parents=\"%s\"", parent_str->str);
+
+      g_string_free (parent_str, TRUE);
+    }
 
   if (G_TYPE_IS_ABSTRACT (type))
     escaped_printf (out, " abstract=\"1\"");
@@ -188,7 +208,11 @@ dump_interface_type (GType type, const char *symbol, GOutputStream *out)
       GType itype = interfaces[i];
       if (itype == G_TYPE_OBJECT)
        {
-         /* This is implicit */
+         /* Treat this as implicit for now; in theory GInterfaces are
+          * supported on things like GstMiniObject, but right now
+          * the introspection system only supports GObject.
+          * http://bugzilla.gnome.org/show_bug.cgi?id=559706
+          */
          continue;
        }
       escaped_printf (out, "    <prerequisite name=\"%s\"/>\n",
@@ -270,7 +294,11 @@ dump_type (GType type, const char *symbol, GOutputStream *out)
       /* GValue, etc.  Just skip them. */
       break;
     default:
-      g_warning ("unhandled gtype %s", g_type_name (type));
+      /* Other fundamental types such as the once GStreamer and Clutter registers
+       * are not yet interesting from an introspection perspective and should be
+       * ignored
+       */
+      break;
     }
 }
 
@@ -354,7 +382,8 @@ g_irepository_dump (const char *arg, GError **error)
 
       if (type == G_TYPE_INVALID)
        {
-         caught_error = TRUE;
+          g_printerr ("Invalid GType: '%s'\n", line);
+          caught_error = TRUE;
          g_free (line);
          break;
        }