summaryrefslogtreecommitdiffstats
path: root/Objects/sliceobject.c
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2008-06-09 04:58:54 (GMT)
committerGregory P. Smith <greg@mad-scientist.com>2008-06-09 04:58:54 (GMT)
commitdd96db63f689e2f0d8ae5a1436b3b3395eec7de5 (patch)
treeb2299acac9ce44fc488fc7b2ae2a44548cd5fbb8 /Objects/sliceobject.c
parente98839a1f48b2915f1cc747884e64f4d6e4c8e7a (diff)
downloadcpython-dd96db63f689e2f0d8ae5a1436b3b3395eec7de5.zip
cpython-dd96db63f689e2f0d8ae5a1436b3b3395eec7de5.tar.gz
cpython-dd96db63f689e2f0d8ae5a1436b3b3395eec7de5.tar.bz2
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.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/Objects/sliceobject.c b/Objects/sliceobject.c
index 75048e3..075418e 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;
}