summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2020-08-02 15:22:37 +0200
committerStefan Behnel <stefan_ml@behnel.de>2020-08-02 15:22:37 +0200
commitc2fab361c66fb6e4e2f1775b4eddf27e081721b3 (patch)
treebaceff6122a4094a134cefb57b9080fdbcfd86d4
parente477b14bf129c065fd7c31d94cd60c6a736eab2c (diff)
parent4c02adc906a55cd5ac663b2bb62418cf1132092f (diff)
downloadcython-c2fab361c66fb6e4e2f1775b4eddf27e081721b3.tar.gz
Merge branch '0.29.x'
-rw-r--r--Cython/Includes/cpython/array.pxd4
1 files 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