Change unsigned to Py_ssize_t, removed Py_UNICODE declaration.

parent 13d9929e
...@@ -58,7 +58,6 @@ from cpython.ref cimport PyTypeObject ...@@ -58,7 +58,6 @@ from cpython.ref cimport PyTypeObject
from cpython.exc cimport PyErr_BadArgument from cpython.exc cimport PyErr_BadArgument
cdef extern from "arrayarray.h": cdef extern from "arrayarray.h":
ctypedef short Py_UNICODE
ctypedef class array.array [object arrayobject] ctypedef class array.array [object arrayobject]
ctypedef object GETF(array a, Py_ssize_t ix) ctypedef object GETF(array a, Py_ssize_t ix)
ctypedef object SETF(array a, Py_ssize_t ix, object o) ctypedef object SETF(array a, Py_ssize_t ix, object o)
...@@ -73,7 +72,7 @@ cdef extern from "arrayarray.h": ...@@ -73,7 +72,7 @@ cdef extern from "arrayarray.h":
cdef: cdef:
PyTypeObject* ob_type PyTypeObject* ob_type
unsigned length # == ob_size (by union) Py_ssize_t length # == ob_size (by union)
arraydescr* ob_descr # struct arraydescr *ob_descr; arraydescr* ob_descr # struct arraydescr *ob_descr;
# views of ob_item: # views of ob_item:
......
...@@ -35,8 +35,7 @@ typedef struct arraydescr { ...@@ -35,8 +35,7 @@ typedef struct arraydescr {
typedef struct arrayobject { typedef struct arrayobject {
PyObject_HEAD PyObject_HEAD
union { union {
Py_ssize_t ob_size; Py_ssize_t ob_size, length;
unsigned length;
}; };
union { union {
char *ob_item; char *ob_item;
......
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