[transformer] Look up callback types in the full name set, not just typedefs
authorColin Walters <walters@verbum.org>
Thu, 3 Dec 2009 23:40:36 +0000 (18:40 -0500)
committerColin Walters <walters@verbum.org>
Tue, 8 Dec 2009 13:57:18 +0000 (08:57 -0500)
When looking up GINames, we should look in _names.names.

giscanner/transformer.py

index a131e3c..bc5d943 100644 (file)
@@ -267,8 +267,10 @@ class Transformer(object):
                       symbol.ident)
 
     def _type_is_callback(self, type):
-        if (isinstance(type, Callback) or
-            isinstance(self._typedefs_ns.get(type.name), Callback)):
+        if isinstance(type, Callback):
+            return True
+        node = self._names.names.get(type.name)
+        if node and isinstance(node[1], Callback):
             return True
         return False