summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu.vizoso@collabora.co.uk>2010-09-09 16:04:08 +0200
committerTomeu Vizoso <tomeu.vizoso@collabora.co.uk>2010-09-09 16:04:08 +0200
commit9087a67088a001536844e86c891f623eaf77c0e4 (patch)
tree7a39aee966f7cfef89b183d8c773c7d6520b3b9e
parent46d31ab22fa500495347031573f85a40e4f3daa3 (diff)
downloadgobject-introspection-9087a67088a001536844e86c891f623eaf77c0e4.tar.gz
Use Node.ctype instead of Node.c_name when looking up comment blocks
We were missing some annotation blocks for structs in typelibs with a name different to the C prefix.
-rw-r--r--giscanner/maintransformer.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
index 01bc7b41..4a9c9528 100644
--- a/giscanner/maintransformer.py
+++ b/giscanner/maintransformer.py
@@ -168,7 +168,10 @@ class MainTransformer(object):
if isinstance(node, (ast.Class, ast.Interface, ast.Record,
ast.Union, ast.Enum, ast.Bitfield,
ast.Callback)):
- block = self._blocks.get(node.c_name)
+ if node.ctype is not None:
+ block = self._blocks.get(node.ctype)
+ else:
+ block = self._blocks.get(node.c_name)
self._apply_annotations_annotated(node, block)
if isinstance(node, (ast.Class, ast.Interface, ast.Record, ast.Union)):
for field in node.fields: