diff options
author | Gregory P. Smith <greg@mad-scientist.com> | 2008-06-09 04:58:54 +0000 |
---|---|---|
committer | Gregory P. Smith <greg@mad-scientist.com> | 2008-06-09 04:58:54 +0000 |
commit | 134de0271f8611c6d4f4e53f3d45ee8eed65e3ab (patch) | |
tree | 7b466b9d59bca636b4a061191382d3f72324a344 /Objects/sliceobject.c | |
parent | 505f75b09d4cd430b69d02a07826d4510895d1e4 (diff) | |
download | cpython-134de0271f8611c6d4f4e53f3d45ee8eed65e3ab.tar.gz |
This reverts r63675 based on the discussion in this thread:
http://mail.python.org/pipermail/python-dev/2008-June/079988.html
Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names
in the spirit of 3.0 are available via a #define only. See the email thread.
Diffstat (limited to 'Objects/sliceobject.c')
-rw-r--r-- | Objects/sliceobject.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Objects/sliceobject.c b/Objects/sliceobject.c index 75048e353f..075418ebcc 100644 --- a/Objects/sliceobject.c +++ b/Objects/sliceobject.c @@ -19,7 +19,7 @@ this type and there is exactly one in existence. static PyObject * ellipsis_repr(PyObject *op) { - return PyBytes_FromString("Ellipsis"); + return PyString_FromString("Ellipsis"); } static PyTypeObject PyEllipsis_Type = { @@ -228,14 +228,14 @@ slice_repr(PySliceObject *r) { PyObject *s, *comma; - s = PyBytes_FromString("slice("); - comma = PyBytes_FromString(", "); - PyBytes_ConcatAndDel(&s, PyObject_Repr(r->start)); - PyBytes_Concat(&s, comma); - PyBytes_ConcatAndDel(&s, PyObject_Repr(r->stop)); - PyBytes_Concat(&s, comma); - PyBytes_ConcatAndDel(&s, PyObject_Repr(r->step)); - PyBytes_ConcatAndDel(&s, PyBytes_FromString(")")); + s = PyString_FromString("slice("); + comma = PyString_FromString(", "); + PyString_ConcatAndDel(&s, PyObject_Repr(r->start)); + PyString_Concat(&s, comma); + PyString_ConcatAndDel(&s, PyObject_Repr(r->stop)); + PyString_Concat(&s, comma); + PyString_ConcatAndDel(&s, PyObject_Repr(r->step)); + PyString_ConcatAndDel(&s, PyString_FromString(")")); Py_DECREF(comma); return s; } |