Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
Use Node.ctype instead of Node.c_name when looking up comment blocks
Browse files Browse the repository at this point in the history
We were missing some annotation blocks for structs in typelibs with
a name different to the C prefix.
  • Loading branch information
tomeuv committed Sep 9, 2010
1 parent 46d31ab commit 9087a67
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion giscanner/maintransformer.py
Expand Up @@ -168,7 +168,10 @@ def _pass_read_annotations(self, node, chain):
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:
Expand Down

0 comments on commit 9087a67

Please sign in to comment.