try fixing python 2 tests

This commit is contained in:
Philipp Moritz committed 2017-07-19 10:06:33 -07:00
1 parent 2c6d652962
commit 54f595e6e9
1 file changed
+6
+6
View File
@@ -564,6 +564,12 @@ cdef class MutableBuffer(Buffer):
buffer.strides = self.strides
buffer.suboffsets = NULL
def __getwritebuffer__(self, Py_ssize_t idx, void **p):
if idx != 0:
raise SystemError("accessing non-existent buffer segment")
if p != NULL:
p[0] = <void*> self.mutable_buffer.get().data()
return self.size
cdef shared_ptr[PoolBuffer] allocate_buffer(CMemoryPool* pool):
cdef shared_ptr[PoolBuffer] result