Commit a5cc7572 authored by Stefan Behnel's avatar Stefan Behnel

fix char* coercion to other C types (such as void*)

parent 31536bc9
...@@ -836,9 +836,11 @@ class BytesNode(ConstNode): ...@@ -836,9 +836,11 @@ class BytesNode(ConstNode):
if not self.type.is_pyobject: if not self.type.is_pyobject:
if dst_type in (py_object_type, Builtin.bytes_type): if dst_type in (py_object_type, Builtin.bytes_type):
node = self.as_py_string_node(env) node = self.as_py_string_node(env)
else: elif dst_type.is_pyobject:
self.fail_assignment(dst_type) self.fail_assignment(dst_type)
return self return self
else:
node = self
elif dst_type.is_pyobject and dst_type is not py_object_type: elif dst_type.is_pyobject and dst_type is not py_object_type:
self.check_for_coercion_error(dst_type, fail=True) self.check_for_coercion_error(dst_type, fail=True)
return self return self
......
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