Commit c49ca39a authored by Xavier Thompson's avatar Xavier Thompson

Fix cypclass methods with self-type arguments not being wrapped to Python

parent de75f987
...@@ -281,7 +281,7 @@ def NAME(ARGDECLS): ...@@ -281,7 +281,7 @@ def NAME(ARGDECLS):
if py_method_wrapper: if py_method_wrapper:
stats.append(py_method_wrapper) stats.append(py_method_wrapper)
elif not attr.is_type: elif attr.is_variable and attr.name != "this":
property = self.synthesize_property(attr, node.entry) property = self.synthesize_property(attr, node.entry)
if property: if property:
stats.append(property) stats.append(property)
......
...@@ -4309,13 +4309,13 @@ class CypClassType(CppClassType): ...@@ -4309,13 +4309,13 @@ class CypClassType(CppClassType):
self._mro = mro_C3_merge(inputs) self._mro = mro_C3_merge(inputs)
return self._mro return self._mro
# allow conversion to Python only when there is a wrapper type # allow conversion to Python only when there is a wrapper type, or will be one
def can_coerce_to_pyobject(self, env): def can_coerce_to_pyobject(self, env):
return self.wrapper_type is not None return self.wrapper_type is not None or self.support_wrapper
# allow conversion from Python only when there is a wrapper type # allow conversion from Python only when there is a wrapper type, or will be one
def can_coerce_from_pyobject(self, env): def can_coerce_from_pyobject(self, env):
return self.wrapper_type is not None return self.wrapper_type is not None or self.support_wrapper
def create_to_py_utility_code(self, env): def create_to_py_utility_code(self, env):
if not self.wrapper_type: if not self.wrapper_type:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment