Commit 3b9df6ee authored by Robert Bradshaw's avatar Robert Bradshaw

Fix a couple of compiler warnings in tests.

parent eef2bc65
...@@ -17,7 +17,8 @@ available_flags = ( ...@@ -17,7 +17,8 @@ available_flags = (
cdef class MockBuffer: cdef class MockBuffer:
cdef object format, offset cdef object format, offset
cdef void* buffer cdef void* buffer
cdef int len, itemsize, ndim cdef Py_ssize_t len, itemsize
cdef int ndim
cdef Py_ssize_t* strides cdef Py_ssize_t* strides
cdef Py_ssize_t* shape cdef Py_ssize_t* shape
cdef Py_ssize_t* suboffsets cdef Py_ssize_t* suboffsets
...@@ -55,7 +56,7 @@ cdef class MockBuffer: ...@@ -55,7 +56,7 @@ cdef class MockBuffer:
else: break else: break
if len(datashape) > 1: if len(datashape) > 1:
# indirect access # indirect access
self.ndim = len(datashape) self.ndim = <int>len(datashape)
shape = datashape shape = datashape
self.buffer = self.create_indirect_buffer(data, shape) self.buffer = self.create_indirect_buffer(data, shape)
suboffsets = [0] * (self.ndim-1) + [-1] suboffsets = [0] * (self.ndim-1) + [-1]
...@@ -64,7 +65,7 @@ cdef class MockBuffer: ...@@ -64,7 +65,7 @@ cdef class MockBuffer:
else: else:
# strided and/or simple access # strided and/or simple access
self.buffer = self.create_buffer(data) self.buffer = self.create_buffer(data)
self.ndim = len(shape) self.ndim = <int>len(shape)
self.suboffsets = NULL self.suboffsets = NULL
try: try:
......
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