From 4c02adc906a55cd5ac663b2bb62418cf1132092f Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sun, 2 Aug 2020 15:22:17 +0200 Subject: Do not depend on the default type inference in "cpython/array.pxd". --- Cython/Includes/cpython/array.pxd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cython/Includes/cpython/array.pxd b/Cython/Includes/cpython/array.pxd index 3d2bb05e4..19230a0a8 100644 --- a/Cython/Includes/cpython/array.pxd +++ b/Cython/Includes/cpython/array.pxd @@ -131,14 +131,14 @@ cdef inline array clone(array template, Py_ssize_t length, bint zero): """ fast creation of a new array, given a template array. type will be same as template. if zero is true, new array will be initialized with zeroes.""" - op = newarrayobject(Py_TYPE(template), length, template.ob_descr) + cdef array op = newarrayobject(Py_TYPE(template), length, template.ob_descr) if zero and op is not None: memset(op.data.as_chars, 0, length * op.ob_descr.itemsize) return op cdef inline array copy(array self): """ make a copy of an array. """ - op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr) + cdef array op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr) memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize) return op -- cgit v1.2.1