@@ -16,32 +16,13 @@ PyAPI_DATA(PyObject) _Py_EllipsisObject; /* Don't use this directly */
1616
1717/* Slice object interface */
1818
19- /*
20-
21- A slice object containing start, stop, and step data members (the
22- names are from range). After much talk with Guido, it was decided to
23- let these be any arbitrary python type. Py_None stands for omitted values.
24- */
25- #ifndef Py_LIMITED_API
26- typedef struct {
27- PyObject_HEAD
28- PyObject * start , * stop , * step ; /* not NULL */
29- } PySliceObject ;
30- #endif
31-
3219PyAPI_DATA (PyTypeObject ) PySlice_Type ;
3320PyAPI_DATA (PyTypeObject ) PyEllipsis_Type ;
3421
3522#define PySlice_Check (op ) Py_IS_TYPE((op), &PySlice_Type)
3623
3724PyAPI_FUNC (PyObject * ) PySlice_New (PyObject * start , PyObject * stop ,
3825 PyObject * step );
39- #ifndef Py_LIMITED_API
40- PyAPI_FUNC (PyObject * ) _PySlice_FromIndices (Py_ssize_t start , Py_ssize_t stop );
41- PyAPI_FUNC (int ) _PySlice_GetLongIndices (PySliceObject * self , PyObject * length ,
42- PyObject * * start_ptr , PyObject * * stop_ptr ,
43- PyObject * * step_ptr );
44- #endif
4526PyAPI_FUNC (int ) PySlice_GetIndices (PyObject * r , Py_ssize_t length ,
4627 Py_ssize_t * start , Py_ssize_t * stop , Py_ssize_t * step );
4728Py_DEPRECATED (3.7 )
@@ -63,6 +44,12 @@ PyAPI_FUNC(Py_ssize_t) PySlice_AdjustIndices(Py_ssize_t length,
6344 Py_ssize_t step );
6445#endif
6546
47+ #ifndef Py_LIMITED_API
48+ # define Py_CPYTHON_SLICEOBJECT_H
49+ # include "cpython/sliceobject.h"
50+ # undef Py_CPYTHON_SLICEOBJECT_H
51+ #endif
52+
6653#ifdef __cplusplus
6754}
6855#endif
0 commit comments