summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiovanni Campagna <gcampagna@src.gnome.org>2014-02-25 02:35:28 +0100
committerGiovanni Campagna <gcampagna@src.gnome.org>2014-02-26 17:27:07 +0100
commitd66b9ec78a8338a90a5b36df69a93cf21040e972 (patch)
tree3d5ab626496f4b8e6222a8e331751a8f586eb522
parentd4d99ae95fca8595d37e7bae4be25d51bf3d2f1e (diff)
downloadgobject-introspection-d66b9ec78a8338a90a5b36df69a93cf21040e972.tar.gz
docwriter/gjs: ignore nodes without a namespace
g-ir-compiler ignores them too, and they cause a crash, so whatever.
-rw-r--r--giscanner/docwriter.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/giscanner/docwriter.py b/giscanner/docwriter.py
index 92fa127a..37f575b7 100644
--- a/giscanner/docwriter.py
+++ b/giscanner/docwriter.py
@@ -592,6 +592,14 @@ class DocFormatterGjs(DocFormatterIntrospectableBase):
if isinstance(node, (ast.Compound, ast.Boxed)):
self.resolve_gboxed_constructor(node)
+ # Nodes without namespace are AST bugs really
+ # They are used for structs and unions declared
+ # inline inside other structs, but they are not
+ # even picked up by g-ir-compiler, because they
+ # don't create a <type/> element.
+ # So just ignore them.
+ if isinstance(node, ast.Node) and node.namespace is None:
+ return False
if isinstance(node, ast.ErrorQuarkFunction):
return False
if isinstance(node, ast.Field):