mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
Merge branches/pep-0384.
This commit is contained in:
parent
c4df784514
commit
4d0d471a80
102 changed files with 2835 additions and 75 deletions
|
@ -18,11 +18,12 @@ A slice object containing start, stop, and step data members (the
|
|||
names are from range). After much talk with Guido, it was decided to
|
||||
let these be any arbitrary python type. Py_None stands for omitted values.
|
||||
*/
|
||||
|
||||
#ifndef Py_LIMITED_API
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
PyObject *start, *stop, *step; /* not NULL */
|
||||
} PySliceObject;
|
||||
#endif
|
||||
|
||||
PyAPI_DATA(PyTypeObject) PySlice_Type;
|
||||
PyAPI_DATA(PyTypeObject) PyEllipsis_Type;
|
||||
|
@ -31,10 +32,12 @@ PyAPI_DATA(PyTypeObject) PyEllipsis_Type;
|
|||
|
||||
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_GetIndices(PySliceObject *r, Py_ssize_t length,
|
||||
#endif
|
||||
PyAPI_FUNC(int) PySlice_GetIndices(PyObject *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,
|
||||
PyAPI_FUNC(int) PySlice_GetIndicesEx(PyObject *r, Py_ssize_t length,
|
||||
Py_ssize_t *start, Py_ssize_t *stop,
|
||||
Py_ssize_t *step, Py_ssize_t *slicelength);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue