Commit a0666fde authored by gsamain's avatar gsamain Committed by Xavier Thompson

Make nullptr assignable to cyobject

parent f906d9a6
......@@ -4063,7 +4063,7 @@ class CypClassType(CppClassType):
return "((%s)%s)" % (self.declaration_code(''), expr_code)
def assignable_from_resolved_type(self, other_type):
if other_type.is_ptr and other_type.base_type.is_cpp_class and other_type.base_type.is_subclass(self):
if other_type.is_ptr and other_type.base_type.is_cpp_class and other_type.base_type.is_subclass(self) or other_type.is_null_ptr:
return 1
return super(CypClassType, self).assignable_from_resolved_type(other_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