mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
Stop duplicating code and handle slice indices consistently and correctly
wrt to ssize_t.
This commit is contained in:
parent
90768424f8
commit
badc086543
4 changed files with 25 additions and 44 deletions
|
@ -30,6 +30,7 @@ PyAPI_DATA(PyTypeObject) PySlice_Type;
|
|||
|
||||
PyAPI_FUNC(PyObject *) PySlice_New(PyObject* start, PyObject* stop,
|
||||
PyObject* step);
|
||||
PyAPI_FUNC(PyObject *) _PySlice_FromIndices(Py_ssize_t start, Py_ssize_t stop);
|
||||
PyAPI_FUNC(int) PySlice_GetIndices(PySliceObject *r, Py_ssize_t length,
|
||||
Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step);
|
||||
PyAPI_FUNC(int) PySlice_GetIndicesEx(PySliceObject *r, Py_ssize_t length,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue