Commit 0041db28 authored by Stefan Behnel's avatar Stefan Behnel

Add safety cast in queue tutorial code that avoids casting a potentially...

Add safety cast in queue tutorial code that avoids casting a potentially non-pointer-sized "int" to a "void*".
parent bf817f15
......@@ -24,7 +24,7 @@ cdef class Queue:
cpdef append(self, int value):
if not cqueue.queue_push_tail(self._c_queue,
<void*> value):
<void*> <Py_ssize_t> value):
raise MemoryError()
# The `cpdef` feature is obviously not available for the original "extend()"
......
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