summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2010-09-10 13:14:32 -0400
committerColin Walters <walters@verbum.org>2010-09-10 15:07:59 -0400
commit8ace70db2bdcf403bacf05e20d126cb4956c4640 (patch)
tree5c999ede45c931ddff6105bc30e5b06eabfccb87
parente2e4ee68e7127d1381292fb700ec9eb4d240ff95 (diff)
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
-rw-r--r--giscanner/gdumpparser.py13
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: