[gobject-introspection] docwriter: extend the "node without namespace" filtering to all languages



commit 17b4a3bdb94d818a8bd67f14b72fb6a6c98229d9
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Tue Feb 25 18:57:54 2014 +0100

    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 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/giscanner/docwriter.py b/giscanner/docwriter.py
index d62425b..ec998f5 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):


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]