summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiovanni Campagna <gcampagna@src.gnome.org>2014-02-25 18:57:54 +0100
committerGiovanni Campagna <gcampagna@src.gnome.org>2014-02-26 17:27:08 +0100
commit17b4a3bdb94d818a8bd67f14b72fb6a6c98229d9 (patch)
tree0e99cf479a787361b9e615c4e6f58022c43ebe1d
parent6432c9213bff425d7d0f2be39df59337588caff3 (diff)
downloadgobject-introspection-17b4a3bdb94d818a8bd67f14b72fb6a6c98229d9.tar.gz
docwriter: extend the "node without namespace" filtering to all languages
As the comment says, it's an AST bug, the structure there cannot be reasonably represented in gobject-introspection, and it makes the tests for C and Python crash, so whatever.
-rw-r--r--giscanner/docwriter.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/giscanner/docwriter.py b/giscanner/docwriter.py
index d62425b2..ec998f5a 100644
--- a/giscanner/docwriter.py
+++ b/giscanner/docwriter.py
@@ -183,6 +183,14 @@ class DocFormatter(object):
def should_render_node(self, node):
if getattr(node, "private", False):
return False
+ # 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
return True
@@ -607,14 +615,6 @@ class DocFormatterGjs(DocFormatterIntrospectableBase):
len(node.methods) == len(node.static_methods) == len(node.constructors) == 0:
return False
- # 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):