]>
Commit | Line | Data |
---|---|---|
c8042e10 DM |
1 | #ifndef Py_SLICEOBJECT_H\r |
2 | #define Py_SLICEOBJECT_H\r | |
3 | #ifdef __cplusplus\r | |
4 | extern "C" {\r | |
5 | #endif\r | |
6 | \r | |
7 | /* The unique ellipsis object "..." */\r | |
8 | \r | |
9 | PyAPI_DATA(PyObject) _Py_EllipsisObject; /* Don't use this directly */\r | |
10 | \r | |
11 | #define Py_Ellipsis (&_Py_EllipsisObject)\r | |
12 | \r | |
13 | /* Slice object interface */\r | |
14 | \r | |
15 | /*\r | |
16 | \r | |
17 | A slice object containing start, stop, and step data members (the\r | |
18 | names are from range). After much talk with Guido, it was decided to\r | |
19 | let these be any arbitrary python type. Py_None stands for omitted values.\r | |
20 | */\r | |
21 | \r | |
22 | typedef struct {\r | |
23 | PyObject_HEAD\r | |
24 | PyObject *start, *stop, *step; /* not NULL */\r | |
25 | } PySliceObject;\r | |
26 | \r | |
27 | PyAPI_DATA(PyTypeObject) PySlice_Type;\r | |
28 | PyAPI_DATA(PyTypeObject) PyEllipsis_Type;\r | |
29 | \r | |
30 | #define PySlice_Check(op) (Py_TYPE(op) == &PySlice_Type)\r | |
31 | \r | |
32 | PyAPI_FUNC(PyObject *) PySlice_New(PyObject* start, PyObject* stop,\r | |
33 | PyObject* step);\r | |
34 | PyAPI_FUNC(PyObject *) _PySlice_FromIndices(Py_ssize_t start, Py_ssize_t stop);\r | |
35 | PyAPI_FUNC(int) PySlice_GetIndices(PySliceObject *r, Py_ssize_t length,\r | |
36 | Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step);\r | |
37 | PyAPI_FUNC(int) PySlice_GetIndicesEx(PySliceObject *r, Py_ssize_t length,\r | |
38 | Py_ssize_t *start, Py_ssize_t *stop, \r | |
39 | Py_ssize_t *step, Py_ssize_t *slicelength);\r | |
40 | \r | |
41 | #ifdef __cplusplus\r | |
42 | }\r | |
43 | #endif\r | |
44 | #endif /* !Py_SLICEOBJECT_H */\r |