summaryrefslogtreecommitdiff
path: root/giscanner/docwriter.py
diff options
context:
space:
mode:
authorGiovanni Campagna <gcampagna@src.gnome.org>2014-03-02 17:09:30 +0100
committerGiovanni Campagna <gcampagna@gnome.org>2014-03-05 17:12:39 +0100
commitb37385ce894bd6fa8d931c9b886f5eb1bf3376d2 (patch)
tree3f1381f07983a36e6478b6c51ead02c493ffd416 /giscanner/docwriter.py
parentbaa2992fd2291157808e9ff5b5387de29a61a773 (diff)
downloadgobject-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.py4
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: