Commit 13648de7 authored by Robert Bradshaw's avatar Robert Bradshaw

Unique NULL.

parent a13fab25
...@@ -109,7 +109,7 @@ class PointerType(CythonType): ...@@ -109,7 +109,7 @@ class PointerType(CythonType):
self._items = [cast(self._basetype, a) for a in value._items] self._items = [cast(self._basetype, a) for a in value._items]
elif isinstance(value, list): elif isinstance(value, list):
self._items = [cast(self._basetype, a) for a in value] self._items = [cast(self._basetype, a) for a in value]
elif value is None: elif value is None or value is 0:
self._items = [] self._items = []
else: else:
raise ValueError raise ValueError
...@@ -130,7 +130,7 @@ class PointerType(CythonType): ...@@ -130,7 +130,7 @@ class PointerType(CythonType):
elif type(self) != type(value): elif type(self) != type(value):
return False return False
else: else:
return self._items == value._items return not self._items and not value._items
class ArrayType(PointerType): class ArrayType(PointerType):
...@@ -273,5 +273,4 @@ for t in int_types + float_types + complex_types + other_types: ...@@ -273,5 +273,4 @@ for t in int_types + float_types + complex_types + other_types:
gs["%s_%s" % ('p'*i, t)] = globals()[t]._pointer(i) gs["%s_%s" % ('p'*i, t)] = globals()[t]._pointer(i)
void = typedef(None) void = typedef(None)
NULL = None NULL = p_void(0)
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