diff options
author | Tomeu Vizoso <tomeu.vizoso@collabora.co.uk> | 2010-09-09 16:04:08 +0200 |
---|---|---|
committer | Tomeu Vizoso <tomeu.vizoso@collabora.co.uk> | 2010-09-09 16:04:08 +0200 |
commit | 9087a67088a001536844e86c891f623eaf77c0e4 (patch) | |
tree | 7a39aee966f7cfef89b183d8c773c7d6520b3b9e /giscanner | |
parent | 46d31ab22fa500495347031573f85a40e4f3daa3 (diff) | |
download | gobject-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.
Diffstat (limited to 'giscanner')
-rw-r--r-- | giscanner/maintransformer.py | 5 |
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: |