summaryrefslogtreecommitdiff
path: root/giscanner
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu.vizoso@collabora.co.uk>2010-09-09 16:33:25 +0200
committerTomeu Vizoso <tomeu.vizoso@collabora.co.uk>2010-09-09 16:35:25 +0200
commita9dc0722ae291fc0644cebc9f2ec3bb61b0d9d87 (patch)
tree596b65cc07a140f0d4f376ebc496baa40448439d /giscanner
parentc6cf170030cf46b0f156e4dc84e47a4339eff6af (diff)
downloadgobject-introspection-a9dc0722ae291fc0644cebc9f2ec3bb61b0d9d87.tar.gz
Foreign structs can have constructors
Diffstat (limited to 'giscanner')
-rw-r--r--giscanner/maintransformer.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
index 4a9c9528..a60b9bb6 100644
--- a/giscanner/maintransformer.py
+++ b/giscanner/maintransformer.py
@@ -822,7 +822,7 @@ method or constructor of some type."""
target = self._transformer.lookup_typenode(func.retval.type)
if not (isinstance(target, ast.Class)
or (isinstance(target, (ast.Record, ast.Union, ast.Boxed))
- and target.get_type is not None)):
+ and (target.get_type is not None or target.foreign))):
return False
split = self._split_uscored_by_type(subsymbol)
@@ -835,7 +835,7 @@ method or constructor of some type."""
# Some sanity checks; only objects and boxeds can have ctors
if not (isinstance(origin_node, ast.Class)
or (isinstance(origin_node, (ast.Record, ast.Union, ast.Boxed))
- and origin_node.get_type is not None)):
+ and (origin_node.get_type is not None or origin_node.foreign))):
return False
# Verify the namespace - don't want to append to foreign namespaces!
if origin_node.namespace != self._namespace: