From e79ea48ac3fa5db8a3042b7ff2bc0c3976833f51 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 27 Jul 2021 14:47:15 +0100 Subject: Ignore accessor annotations for non-introspectable properties If a property is not introspectable we need to decouple it from its accessors; the property data will not be compiled into the typelib, and when the compiler will try to resolve the offsets into the binary blob we'll get a fatal exception. --- giscanner/maintransformer.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'giscanner/maintransformer.py') diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py index 4e4a5573..3da86797 100644 --- a/giscanner/maintransformer.py +++ b/giscanner/maintransformer.py @@ -1466,6 +1466,8 @@ method or constructor of some type.""" def _pair_property_accessors(self, node): """Look for accessor methods for class properties""" for prop in node.properties: + if not prop.introspectable: + continue if prop.setter is None: normalized_name = prop.name.replace('-', '_') if prop.writable and not prop.construct_only: @@ -1486,6 +1488,8 @@ method or constructor of some type.""" else: getter = [prop.getter] for method in node.methods: + if not method.introspectable: + continue if setter is not None and method.name == setter: if method.set_property is None: method.set_property = prop.name -- cgit v1.2.1