[gobject-introspection] scanner: Add a hack for AtkAttributeSet



commit 811dcbbb9e549477ae5992ac4badbecf218bf421
Author: Colin Walters <walters verbum org>
Date:   Wed Aug 25 15:55:25 2010 -0400

    scanner: Add a hack for AtkAttributeSet

 giscanner/maintransformer.py |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
index f1d0d68..a7cc615 100644
--- a/giscanner/maintransformer.py
+++ b/giscanner/maintransformer.py
@@ -45,6 +45,15 @@ class MainTransformer(object):
     # Public API
 
     def transform(self):
+        # Dirty hack for now...maybe eventually we'll support the "typedef GSList FooSet"
+        # pattern.
+        if self._namespace.name == 'Atk':
+            attribute = self._namespace.get('Attribute')
+            attributeset = self._namespace.get('AttributeSet')
+            if attribute and attributeset:
+                alias = ast.Alias('AttributeSet', target=ast.TYPE_ANY)
+                self._namespace.append(alias, replace=True)
+
         # We have a rough tree which should have most of of the types
         # we know about.  Let's attempt closure; walk over all of the
         # Type() types and see if they match up with something.



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