summaryrefslogtreecommitdiff
path: root/giscanner/girwriter.py
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2021-06-17 14:14:09 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2021-08-05 17:47:29 +0100
commitf83e75ddb971561503dd3afb58edbaa2aaf6dc0e (patch)
treec64f069437b9e77798229a31d6b6f303637e016f /giscanner/girwriter.py
parentb058ccaedad3c4d353abf3c1d0b490579e246fd0 (diff)
downloadgobject-introspection-f83e75ddb971561503dd3afb58edbaa2aaf6dc0e.tar.gz
Add annotations for property setters and getters
We need new annotations to allow library developers to associate a setter and a getter functions to a property definition.
Diffstat (limited to 'giscanner/girwriter.py')
-rw-r--r--giscanner/girwriter.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/giscanner/girwriter.py b/giscanner/girwriter.py
index 9551f18f..9a315145 100644
--- a/giscanner/girwriter.py
+++ b/giscanner/girwriter.py
@@ -556,6 +556,10 @@ class GIRWriter(XMLWriter):
attrs.append(('construct-only', '1'))
if prop.transfer:
attrs.append(('transfer-ownership', prop.transfer))
+ if prop.setter:
+ attrs.append(('setter', prop.setter))
+ if prop.getter:
+ attrs.append(('getter', prop.getter))
with self.tagcontext('property', attrs):
self._write_generic(prop)
self._write_type(prop.type)