Skip to content

Commit ab34c2f

Browse files
committed
Fix compilation warnings in memoryobject.c
1 parent 76c989d commit ab34c2f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

graalpython/com.oracle.graal.python.cext/src/memoryobject.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@ PyObject* PyTruffle_MemoryViewFromObject(PyObject *v) {
121121
polyglot_from_string(buffer->format ? buffer->format : "B", "ascii"),
122122
buffer->ndim,
123123
polyglot_from_i8_array(buffer->buf, buffer->len),
124-
buffer->shape ? polyglot_from_size_array(buffer->shape, ndim) : NULL,
125-
buffer->strides ? polyglot_from_size_array(buffer->strides, ndim) : NULL,
126-
buffer->suboffsets ? polyglot_from_size_array(buffer->suboffsets, ndim) : NULL);
124+
buffer->shape ? polyglot_from_size_array((int64_t*)buffer->shape, ndim) : NULL,
125+
buffer->strides ? polyglot_from_size_array((int64_t*)buffer->strides, ndim) : NULL,
126+
buffer->suboffsets ? polyglot_from_size_array((int64_t*)buffer->suboffsets, ndim) : NULL);
127127
if (!needs_release) {
128128
free(buffer);
129129
}
@@ -164,9 +164,9 @@ PyObject* PyMemoryView_FromBuffer(Py_buffer *buffer) {
164164
polyglot_from_string(buffer->format ? buffer->format : "B", "ascii"),
165165
buffer->ndim,
166166
polyglot_from_i8_array(buffer->buf, buffer->len),
167-
buffer->shape ? polyglot_from_size_array(buffer->shape, ndim) : NULL,
168-
buffer->strides ? polyglot_from_size_array(buffer->strides, ndim) : NULL,
169-
buffer->suboffsets ? polyglot_from_size_array(buffer->suboffsets, ndim) : NULL);
167+
buffer->shape ? polyglot_from_size_array((int64_t*)buffer->shape, ndim) : NULL,
168+
buffer->strides ? polyglot_from_size_array((int64_t*)buffer->strides, ndim) : NULL,
169+
buffer->suboffsets ? polyglot_from_size_array((int64_t*)buffer->suboffsets, ndim) : NULL);
170170
}
171171

172172
PyObject *PyMemoryView_FromMemory(char *mem, Py_ssize_t size, int flags) {

0 commit comments

Comments
 (0)