blob: ac7cd13cbb13a4c553c8f31058c14c8c03992fcd [file] [log] [blame]
Guido van Rossume15d0de1996-07-30 16:42:30 +00001#ifndef Py_SLICEOBJECT_H
2#define Py_SLICEOBJECT_H
3#ifdef __cplusplus
4extern "C" {
5#endif
6
7/* The unique ellipses object "..." */
8
9extern DL_IMPORT(PyObject) _Py_EllipsesObject; /* Don't use this directly */
10
11#define Py_Ellipses (&_Py_EllipsesObject)
12
13
14/* Slice object interface */
15
16/*
17
18A slice object containing start, stop, and step data members (the
19names are from range). After much talk with Guido, it was decided to
20let these be any arbitrary python type.
21*/
22
23typedef struct {
24 PyObject_HEAD
25 PyObject *start, *stop, *step;
26} PySliceObject;
27
28extern DL_IMPORT(PyTypeObject) PySlice_Type;
29
30#define PySlice_Check(op) ((op)->ob_type == &PySlice_Type)
31
32PyObject *PySlice_New Py_PROTO((
33 PyObject* start, PyObject* stop, PyObject* step));
34int PySlice_GetIndices Py_PROTO((
35 PySliceObject *r, int length, int *start, int *stop, int *step));
36
37#ifdef __cplusplus
38}
39#endif
40#endif /* !Py_SLICEOBJECT_H */