diff options
author | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2018-02-10 00:00:00 +0000 |
---|---|---|
committer | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2019-01-10 17:34:28 +0100 |
commit | f606183a010fbec4382acb728882cc0eddbaf7f7 (patch) | |
tree | a94577a1c4baff25753e78896d700cd71797437f /giscanner/docwriter.py | |
parent | 0b6bca5d69cc0f5e5564a2858f220fac8ee4789e (diff) | |
download | gobject-introspection-f606183a010fbec4382acb728882cc0eddbaf7f7.tar.gz |
Restore original meaning of disguised attribute.
> Certain types like GIConv and GdkAtom are pointers internally but don't
> look like pointers when referenced. They have the form.
>
> typedef struct _X *X;
>
> Parse these as structures/records but mark them in the gir with a 'disguised'
> attribute so that we know that they need special handling.
Additionally, stop relaying on disguised attribute when deciding whether
to render a page. Check number of fields instead, so as to avoid
introducing large regression in the docs.
Fixes #101.
Diffstat (limited to 'giscanner/docwriter.py')
-rw-r--r-- | giscanner/docwriter.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/giscanner/docwriter.py b/giscanner/docwriter.py index aa8b993c..e09427f9 100644 --- a/giscanner/docwriter.py +++ b/giscanner/docwriter.py @@ -861,7 +861,7 @@ class DocFormatterGjs(DocFormatterIntrospectableBase): if isinstance(node, (ast.Compound, ast.Boxed)): self.resolve_gboxed_constructor(node) - if isinstance(node, ast.Compound) and node.disguised and \ + if isinstance(node, ast.Compound) and len(node.fields) == 0 and \ len(node.methods) == len(node.static_methods) == len(node.constructors) == 0: return False |