1 #ifndef Py_SLICEOBJECT_H
2 #define Py_SLICEOBJECT_H
7 /* The unique ellipsis object "..." */
9 PyAPI_DATA(PyObject
) _Py_EllipsisObject
; /* Don't use this directly */
11 #define Py_Ellipsis (&_Py_EllipsisObject)
13 /* Slice object interface */
17 A slice object containing start, stop, and step data members (the
18 names are from range). After much talk with Guido, it was decided to
19 let these be any arbitrary python type. Py_None stands for omitted values.
24 PyObject
*start
, *stop
, *step
; /* not NULL */
27 PyAPI_DATA(PyTypeObject
) PySlice_Type
;
28 PyAPI_DATA(PyTypeObject
) PyEllipsis_Type
;
30 #define PySlice_Check(op) (Py_TYPE(op) == &PySlice_Type)
32 PyAPI_FUNC(PyObject
*) PySlice_New(PyObject
* start
, PyObject
* stop
,
34 PyAPI_FUNC(PyObject
*) _PySlice_FromIndices(Py_ssize_t start
, Py_ssize_t stop
);
35 PyAPI_FUNC(int) PySlice_GetIndices(PySliceObject
*r
, Py_ssize_t length
,
36 Py_ssize_t
*start
, Py_ssize_t
*stop
, Py_ssize_t
*step
);
37 PyAPI_FUNC(int) PySlice_GetIndicesEx(PySliceObject
*r
, Py_ssize_t length
,
38 Py_ssize_t
*start
, Py_ssize_t
*stop
,
39 Py_ssize_t
*step
, Py_ssize_t
*slicelength
);
44 #endif /* !Py_SLICEOBJECT_H */