diff options
author | Giovanni Campagna <gcampagna@src.gnome.org> | 2014-03-02 17:09:30 +0100 |
---|---|---|
committer | Giovanni Campagna <gcampagna@gnome.org> | 2014-03-05 17:12:39 +0100 |
commit | b37385ce894bd6fa8d931c9b886f5eb1bf3376d2 (patch) | |
tree | 3f1381f07983a36e6478b6c51ead02c493ffd416 /giscanner/docwriter.py | |
parent | baa2992fd2291157808e9ff5b5387de29a61a773 (diff) | |
download | gobject-introspection-b37385ce894bd6fa8d931c9b886f5eb1bf3376d2.tar.gz |
docwriter: format bitfields like enums
They are enums after all.
Diffstat (limited to 'giscanner/docwriter.py')
-rw-r--r-- | giscanner/docwriter.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/giscanner/docwriter.py b/giscanner/docwriter.py index 1a82bc74..230cf4c3 100644 --- a/giscanner/docwriter.py +++ b/giscanner/docwriter.py @@ -74,7 +74,7 @@ def get_node_kind(node): node_kind = 'constructor' else: node_kind = 'function' - elif isinstance(node, ast.Enum): + elif isinstance(node, (ast.Enum, ast.Bitfield)): node_kind = 'enum' elif isinstance(node, ast.Property) and node.parent is not None: node_kind = 'property' @@ -821,7 +821,7 @@ class DocFormatterGjs(DocFormatterIntrospectableBase): if resolved: if isinstance(resolved, ast.Compound) and node.type.ctype[-1] != '*': return self._struct_is_simple(resolved) - elif isinstance(resolved, ast.Enum): + elif isinstance(resolved, (ast.Enum, ast.Bitfield)): return True return False else: |