@@ -16,32 +16,13 @@ PyAPI_DATA(PyObject) _Py_EllipsisObject; /* Don't use this directly */
16
16
17
17
/* Slice object interface */
18
18
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
-
32
19
PyAPI_DATA (PyTypeObject ) PySlice_Type ;
33
20
PyAPI_DATA (PyTypeObject ) PyEllipsis_Type ;
34
21
35
22
#define PySlice_Check (op ) Py_IS_TYPE((op), &PySlice_Type)
36
23
37
24
PyAPI_FUNC (PyObject * ) PySlice_New (PyObject * start , PyObject * stop ,
38
25
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
45
26
PyAPI_FUNC (int ) PySlice_GetIndices (PyObject * r , Py_ssize_t length ,
46
27
Py_ssize_t * start , Py_ssize_t * stop , Py_ssize_t * step );
47
28
Py_DEPRECATED (3.7 )
@@ -63,6 +44,12 @@ PyAPI_FUNC(Py_ssize_t) PySlice_AdjustIndices(Py_ssize_t length,
63
44
Py_ssize_t step );
64
45
#endif
65
46
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
+
66
53
#ifdef __cplusplus
67
54
}
68
55
#endif
0 commit comments