Commit eedb9678 authored by gsamain's avatar gsamain

Make nullptr assignable to cyobject

parent 833577c5
...@@ -3918,7 +3918,7 @@ class CypClassType(CppClassType): ...@@ -3918,7 +3918,7 @@ class CypClassType(CppClassType):
return "((%s)%s)" % (self.declaration_code(''), expr_code) return "((%s)%s)" % (self.declaration_code(''), expr_code)
def assignable_from_resolved_type(self, other_type): 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 1
return super(CypClassType, self).assignable_from_resolved_type(other_type) 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