From 17b4a3bdb94d818a8bd67f14b72fb6a6c98229d9 Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Tue, 25 Feb 2014 18:57:54 +0100 Subject: 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. --- giscanner/docwriter.py | 16 ++++++++-------- 1 file 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 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 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): -- cgit v1.2.1