summaryrefslogtreecommitdiff
path: root/giscanner/maintransformer.py
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2012-02-09 15:43:23 -0500
committerJasper St. Pierre <jstpierre@mecheye.net>2012-02-09 16:00:20 -0500
commit9b4185f88aa321b5160b100597d83d295b0af76e (patch)
treeaddf51fee9cc497391d9e54e919fcf5147575171 /giscanner/maintransformer.py
parent9e56835f5ebb601aa0cb22130555a8a4ef15b11b (diff)
downloadgobject-introspection-9b4185f88aa321b5160b100597d83d295b0af76e.tar.gz
scanner: Allow adding annotations to vfuncs directly
Some vfuncs may not have public invokers. In these cases, annotations may still be needed to correctly implement or chain up to a virtual method from a subclass's implementation.
Diffstat (limited to 'giscanner/maintransformer.py')
-rw-r--r--giscanner/maintransformer.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
index a9eea8a1..ad04bffd 100644
--- a/giscanner/maintransformer.py
+++ b/giscanner/maintransformer.py
@@ -1224,6 +1224,10 @@ method or constructor of some type."""
vfunc = ast.VFunction.from_callback(callback)
vfunc.instance_parameter = callback.parameters[0]
vfunc.inherit_file_positions(callback)
+
+ prefix = self._get_annotation_name(class_struct)
+ block = self._blocks.get('%s::%s' % (prefix, vfunc.name))
+ self._apply_annotations_callable(vfunc, [node], block)
node.virtual_methods.append(vfunc)
# Take the set of virtual methods we found, and try