Commit 34c4dad1 authored by Stefan Behnel's avatar Stefan Behnel

make void* the generic spanning type of all pointer types

parent 5b7aaa54
...@@ -3733,9 +3733,6 @@ def independent_spanning_type(type1, type2): ...@@ -3733,9 +3733,6 @@ def independent_spanning_type(type1, type2):
return py_object_type return py_object_type
span_type = _spanning_type(type1, type2) span_type = _spanning_type(type1, type2)
if span_type is None: if span_type is None:
if type1.is_ptr and type2.is_ptr:
# incompatible pointers, void* will do as a result
return c_void_ptr_type
return error_type return error_type
return span_type return span_type
...@@ -3777,6 +3774,9 @@ def _spanning_type(type1, type2): ...@@ -3777,6 +3774,9 @@ def _spanning_type(type1, type2):
# external types are unsafe, so we use PyObject instead # external types are unsafe, so we use PyObject instead
return py_object_type return py_object_type
return type2 return type2
elif type1.is_ptr and type2.is_ptr:
# incompatible pointers, void* will do as a result
return c_void_ptr_type
else: else:
return None return None
......
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