Staging
v0.5.1
https://github.com/python/cpython
Revision d8d884947bf4d592d0e0378ad9637175620292c6 authored by Georg Brandl on 26 November 2010, 07:29:03 UTC, committed by Georg Brandl on 26 November 2010, 07:29:03 UTC
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r85459 | georg.brandl | 2010-10-14 09:23:01 +0200 (Do, 14 Okt 2010) | 1 line

  #9964: Fix failure of test_dis under -OO.
........
  r85460 | georg.brandl | 2010-10-14 09:24:28 +0200 (Do, 14 Okt 2010) | 1 line

  #9964: fix running test_import under -O or -OO.
........
  r85461 | georg.brandl | 2010-10-14 09:29:08 +0200 (Do, 14 Okt 2010) | 1 line

  #9964: fix lib2to3 fixer fix_operator when running under -OO.
........
  r85462 | georg.brandl | 2010-10-14 09:32:52 +0200 (Do, 14 Okt 2010) | 1 line

  #9964: fix running test_xml_etree under -OO.
........
  r85463 | georg.brandl | 2010-10-14 09:34:56 +0200 (Do, 14 Okt 2010) | 1 line

  Better check for "any optimize option given".
........
  r85464 | georg.brandl | 2010-10-14 09:42:27 +0200 (Do, 14 Okt 2010) | 1 line

  #9964: fix running test_compileall under -O and -OO.
........
  r85465 | georg.brandl | 2010-10-14 10:08:56 +0200 (Do, 14 Okt 2010) | 1 line

  #9964: fix running test_cmd_line_script under -O and -OO.
........
1 parent b4b89aa
Raw File
Tip revision: d8d884947bf4d592d0e0378ad9637175620292c6 authored by Georg Brandl on 26 November 2010, 07:29:03 UTC
Merged revisions 85459-85465 via svnmerge from
Tip revision: d8d8849
sliceobject.h
#ifndef Py_SLICEOBJECT_H
#define Py_SLICEOBJECT_H
#ifdef __cplusplus
extern "C" {
#endif

/* The unique ellipsis object "..." */

PyAPI_DATA(PyObject) _Py_EllipsisObject; /* Don't use this directly */

#define Py_Ellipsis (&_Py_EllipsisObject)

/* Slice object interface */

/*

A slice object containing start, stop, and step data members (the
names are from range).  After much talk with Guido, it was decided to
let these be any arbitrary python type.  Py_None stands for omitted values.
*/

typedef struct {
    PyObject_HEAD
    PyObject *start, *stop, *step;	/* not NULL */
} PySliceObject;

PyAPI_DATA(PyTypeObject) PySlice_Type;
PyAPI_DATA(PyTypeObject) PyEllipsis_Type;

#define PySlice_Check(op) (Py_TYPE(op) == &PySlice_Type)

PyAPI_FUNC(PyObject *) PySlice_New(PyObject* start, PyObject* stop,
                                  PyObject* step);
PyAPI_FUNC(PyObject *) _PySlice_FromIndices(Py_ssize_t start, Py_ssize_t stop);
PyAPI_FUNC(int) PySlice_GetIndices(PySliceObject *r, Py_ssize_t length,
                                  Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step);
PyAPI_FUNC(int) PySlice_GetIndicesEx(PySliceObject *r, Py_ssize_t length,
				    Py_ssize_t *start, Py_ssize_t *stop, 
				    Py_ssize_t *step, Py_ssize_t *slicelength);

#ifdef __cplusplus
}
#endif
#endif /* !Py_SLICEOBJECT_H */
back to top