Show More
@@ -508,13 +508,13 b' static PyObject *index_stats(indexObject' | |||||
508 | return NULL; |
|
508 | return NULL; | |
509 |
|
509 | |||
510 | #define istat(__n, __d) \ |
|
510 | #define istat(__n, __d) \ | |
511 |
if (PyDict_SetItemString(obj, __d, PyInt_From |
|
511 | if (PyDict_SetItemString(obj, __d, PyInt_FromSsize_t(self->__n)) == -1) \ | |
512 | goto bail; |
|
512 | goto bail; | |
513 |
|
513 | |||
514 | if (self->added) { |
|
514 | if (self->added) { | |
515 | Py_ssize_t len = PyList_GET_SIZE(self->added); |
|
515 | Py_ssize_t len = PyList_GET_SIZE(self->added); | |
516 | if (PyDict_SetItemString(obj, "index entries added", |
|
516 | if (PyDict_SetItemString(obj, "index entries added", | |
517 |
PyInt_From |
|
517 | PyInt_FromSsize_t(len)) == -1) | |
518 | goto bail; |
|
518 | goto bail; | |
519 | } |
|
519 | } | |
520 |
|
520 |
@@ -109,6 +109,7 b'' | |||||
109 | typedef int Py_ssize_t; |
|
109 | typedef int Py_ssize_t; | |
110 | typedef Py_ssize_t (*lenfunc)(PyObject *); |
|
110 | typedef Py_ssize_t (*lenfunc)(PyObject *); | |
111 | typedef PyObject *(*ssizeargfunc)(PyObject *, Py_ssize_t); |
|
111 | typedef PyObject *(*ssizeargfunc)(PyObject *, Py_ssize_t); | |
|
112 | #define PyInt_FromSsize_t PyInt_FromLong | |||
112 |
|
113 | |||
113 | #if !defined(PY_SSIZE_T_MIN) |
|
114 | #if !defined(PY_SSIZE_T_MIN) | |
114 | #define PY_SSIZE_T_MAX INT_MAX |
|
115 | #define PY_SSIZE_T_MAX INT_MAX |
General Comments 0
You need to be logged in to leave comments.
Login now