From f83e75ddb971561503dd3afb58edbaa2aaf6dc0e Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Thu, 17 Jun 2021 14:14:09 +0100 Subject: 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. --- giscanner/girparser.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'giscanner/girparser.py') diff --git a/giscanner/girparser.py b/giscanner/girparser.py index a20de210..d9cda8d2 100644 --- a/giscanner/girparser.py +++ b/giscanner/girparser.py @@ -606,8 +606,10 @@ class GIRParser(object): node.attrib.get('construct') == '1', node.attrib.get('construct-only') == '1', node.attrib.get('transfer-ownership')) - self._parse_generic_attribs(node, prop) + prop.setter = node.attrib.get('setter') + prop.getter = node.attrib.get('getter') prop.parent = parent + self._parse_generic_attribs(node, prop) return prop def _parse_member(self, node): -- cgit v1.2.1