mirror of
https://github.com/python/cpython.git
synced 2025-08-01 07:33:08 +00:00
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.
This commit is contained in:
parent
e98839a1f4
commit
dd96db63f6
173 changed files with 2275 additions and 2280 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue