mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
Issue #16451: Refactor to remove duplication between range and slice in slice index computations.
This commit is contained in:
parent
c3afba104a
commit
ffdb2c21b3
3 changed files with 87 additions and 269 deletions
|
|
@ -34,6 +34,9 @@ PyAPI_FUNC(PyObject *) PySlice_New(PyObject* start, PyObject* stop,
|
|||
PyObject* step);
|
||||
#ifndef Py_LIMITED_API
|
||||
PyAPI_FUNC(PyObject *) _PySlice_FromIndices(Py_ssize_t start, Py_ssize_t stop);
|
||||
PyAPI_FUNC(int) _PySlice_GetLongIndices(PySliceObject *self, PyObject *length,
|
||||
PyObject **start_ptr, PyObject **stop_ptr,
|
||||
PyObject **step_ptr);
|
||||
#endif
|
||||
PyAPI_FUNC(int) PySlice_GetIndices(PyObject *r, Py_ssize_t length,
|
||||
Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue