[gobject-introspection] scanner: Allow gstreamer's GParamSpecMiniObject through



commit 8ace70db2bdcf403bacf05e20d126cb4956c4640
Author: Colin Walters <walters verbum org>
Date:   Fri Sep 10 13:14:32 2010 -0400

    scanner: Allow gstreamer's GParamSpecMiniObject through
    
    It's wrong, but they can't change it now, so work around it here.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=550616
    
    https://bugzilla.gnome.org/show_bug.cgi?id=629306

 giscanner/gdumpparser.py |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/giscanner/gdumpparser.py b/giscanner/gdumpparser.py
index ed62dfa..7960e97 100644
--- a/giscanner/gdumpparser.py
+++ b/giscanner/gdumpparser.py
@@ -339,8 +339,21 @@ blob containing data gleaned from GObject's primitive introspection."""
         else:
             self._namespace.append(node, replace=True)
 
+    def _introspect_boxed_gstreamer_workaround(self, xmlnode):
+        node = ast.Boxed('ParamSpecMiniObject', gtype_name='GParamSpecMiniObject',
+                         get_type='gst_param_spec_mini_object_get_type',
+                         c_symbol_prefix='param_spec_mini_object')
+        self._boxed_types[node.gtype_name] = node
+
     def _introspect_boxed(self, xmlnode):
         type_name = xmlnode.attrib['name']
+
+        # Work around GStreamer legacy naming issue
+        # https://bugzilla.gnome.org/show_bug.cgi?id=550616
+        if type_name == 'GParamSpecMiniObject':
+            self._introspect_boxed_gstreamer_workaround(xmlnode)
+            return
+
         try:
             name = self._transformer.strip_identifier(type_name)
         except TransformerException, e:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]