gobject-introspection/gobject-introspection-keyring-workaround.patch

31 lines
1.2 KiB
Diff

commit 41d11cd82ddfc38d4d347cb039919f11536d12d3
Author: Vincent Untz <vuntz@gnome.org>
Date: Sat Sep 18 11:34:47 2010 +0200
scanner: Add workaround for libgnome-keyring
https://bugzilla.gnome.org/show_bug.cgi?id=629426
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
index b7d64a6..2cb878c 100644
--- a/giscanner/maintransformer.py
+++ b/giscanner/maintransformer.py
@@ -57,6 +57,17 @@ class MainTransformer(object):
alias = ast.Alias('AttributeSet', target=ast.TYPE_ANY)
self._namespace.append(alias, replace=True)
+ ## WORKAROUND ##
+ # Same hack as Atk hack.
+ # https://bugzilla.gnome.org/show_bug.cgi?id=629426
+ # https://bugzilla.gnome.org/show_bug.cgi?id=629682
+ if self._namespace.name == 'GnomeKeyring':
+ attribute = self._namespace.get('Attribute')
+ attributelist = self._namespace.get('AttributeList')
+ if attribute and attributelist:
+ alias = ast.Alias('AttributeList', target=ast.TYPE_ANY)
+ self._namespace.append(alias, replace=True)
+
# Some initial namespace surgery
self._namespace.walk(self._pass_fixup_hidden_fields)