diff options
author | orivej <orivej@yandex-team.ru> | 2022-02-10 16:45:01 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:01 +0300 |
commit | 2d37894b1b037cf24231090eda8589bbb44fb6fc (patch) | |
tree | be835aa92c6248212e705f25388ebafcf84bc7a1 /contrib/tools/cython/Cython/Includes/cpython/array.pxd | |
parent | 718c552901d703c502ccbefdfc3c9028d608b947 (diff) | |
download | ydb-2d37894b1b037cf24231090eda8589bbb44fb6fc.tar.gz |
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/tools/cython/Cython/Includes/cpython/array.pxd')
-rw-r--r-- | contrib/tools/cython/Cython/Includes/cpython/array.pxd | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/tools/cython/Cython/Includes/cpython/array.pxd b/contrib/tools/cython/Cython/Includes/cpython/array.pxd index 5d37c007df..19230a0a82 100644 --- a/contrib/tools/cython/Cython/Includes/cpython/array.pxd +++ b/contrib/tools/cython/Cython/Includes/cpython/array.pxd @@ -52,14 +52,14 @@ from libc.string cimport strcat, strncat, \ from cpython.object cimport Py_SIZE from cpython.ref cimport PyTypeObject, Py_TYPE from cpython.exc cimport PyErr_BadArgument -from cpython.mem cimport PyObject_Malloc, PyObject_Free +from cpython.mem cimport PyObject_Malloc, PyObject_Free cdef extern from *: # Hard-coded utility code hack. ctypedef class array.array [object arrayobject] ctypedef object GETF(array a, Py_ssize_t ix) ctypedef object SETF(array a, Py_ssize_t ix, object o) ctypedef struct arraydescr: # [object arraydescr]: - char typecode + char typecode int itemsize GETF getitem # PyObject * (*getitem)(struct arrayobject *, Py_ssize_t); SETF setitem # int (*setitem)(struct arrayobject *, Py_ssize_t, PyObject *); @@ -104,7 +104,7 @@ cdef extern from *: # Hard-coded utility code hack. info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float) info.len = info.itemsize * item_count - info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2) + info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2) if not info.shape: raise MemoryError() info.shape[0] = item_count # constant regardless of resizing @@ -116,7 +116,7 @@ cdef extern from *: # Hard-coded utility code hack. info.obj = self def __releasebuffer__(self, Py_buffer* info): - PyObject_Free(info.shape) + PyObject_Free(info.shape) array newarrayobject(PyTypeObject* type, Py_ssize_t size, arraydescr *descr) |