summaryrefslogtreecommitdiff
path: root/giscanner
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2021-08-05 18:11:25 +0100
committerEmmanuele Bassi <ebassi@gmail.com>2022-02-12 11:09:52 +0000
commit8e85d1ca937c166f07675d02fc84abb27d06ae11 (patch)
treeb6e5c9b4c3bfa4e613ca31f77993babb7ceb279e /giscanner
parentf36f2a00698f0cb4450b04fd59af6412b592e609 (diff)
downloadgobject-introspection-8e85d1ca937c166f07675d02fc84abb27d06ae11.tar.gz
scanner: Mark colliding properties as not introspectable
We prefer methods, signals, and virtual methods to properties, in case of a collision.
Diffstat (limited to 'giscanner')
-rw-r--r--giscanner/introspectablepass.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/giscanner/introspectablepass.py b/giscanner/introspectablepass.py
index e51c22b1..3bb6429a 100644
--- a/giscanner/introspectablepass.py
+++ b/giscanner/introspectablepass.py
@@ -272,6 +272,7 @@ class IntrospectablePass(object):
continue
if s.name.replace('-', '_') == prop.name.replace('-', '_'):
self._property_warning(obj, prop, "Properties cannot have the same name as signals")
+ prop.introspectable = False
return False
def _property_method_collision(self, obj, prop):
@@ -280,6 +281,7 @@ class IntrospectablePass(object):
continue
if m.name == prop.name.replace('-', '_'):
self._property_warning(obj, prop, "Properties cannot have the same name as methods")
+ prop.introspectable = False
return False
def _property_vfunc_collision(self, obj, prop):
@@ -288,6 +290,7 @@ class IntrospectablePass(object):
continue
if vfunc.name == prop.name.replace('-', '_'):
self._property_warning(obj, prop, "Properties cannot have the same name as virtual methods")
+ prop.introspectable = False
return False
def _introspectable_symbol_collisions(self, obj, stack):