[gobject-introspection/ebassi/symbol-collision: 51/51] scanner: Mark colliding properties as not introspectable
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection/ebassi/symbol-collision: 51/51] scanner: Mark colliding properties as not introspectable
- Date: Thu, 5 Aug 2021 17:12:10 +0000 (UTC)
commit 5898ebd9166a8cb6ffdcda64da34642af1ae5cfd
Author: Emmanuele Bassi <ebassi gnome org>
Date: Thu Aug 5 18:11:25 2021 +0100
scanner: Mark colliding properties as not introspectable
We prefer methods, signals, and virtual methods to properties, in case
of a collision.
giscanner/introspectablepass.py | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/giscanner/introspectablepass.py b/giscanner/introspectablepass.py
index 6a999f9f..5bed3ef7 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):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]