summaryrefslogtreecommitdiffstats
path: root/Objects/tupleobject.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/tupleobject.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/tupleobject.c')
-rw-r--r--Objects/tupleobject.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c
index 0524aae..e9cb3ef 100644
--- a/Objects/tupleobject.c
+++ b/Objects/tupleobject.c
@@ -218,7 +218,7 @@ tuplerepr(PyTupleObject *v)
n = Py_SIZE(v);
if (n == 0)
- return PyBytes_FromString("()");
+ return PyString_FromString("()");
/* While not mutable, it is still possible to end up with a cycle in a
tuple through an object that stores itself within a tuple (and thus
@@ -226,7 +226,7 @@ tuplerepr(PyTupleObject *v)
possible within a type. */
i = Py_ReprEnter((PyObject *)v);
if (i != 0) {
- return i > 0 ? PyBytes_FromString("(...)") : NULL;
+ return i > 0 ? PyString_FromString("(...)") : NULL;
}
pieces = PyTuple_New(n);
@@ -246,29 +246,29 @@ tuplerepr(PyTupleObject *v)
/* Add "()" decorations to the first and last items. */
assert(n > 0);
- s = PyBytes_FromString("(");
+ s = PyString_FromString("(");
if (s == NULL)
goto Done;
temp = PyTuple_GET_ITEM(pieces, 0);
- PyBytes_ConcatAndDel(&s, temp);
+ PyString_ConcatAndDel(&s, temp);
PyTuple_SET_ITEM(pieces, 0, s);
if (s == NULL)
goto Done;
- s = PyBytes_FromString(n == 1 ? ",)" : ")");
+ s = PyString_FromString(n == 1 ? ",)" : ")");
if (s == NULL)
goto Done;
temp = PyTuple_GET_ITEM(pieces, n-1);
- PyBytes_ConcatAndDel(&temp, s);
+ PyString_ConcatAndDel(&temp, s);
PyTuple_SET_ITEM(pieces, n-1, temp);
if (temp == NULL)
goto Done;
/* Paste them all together with ", " between. */
- s = PyBytes_FromString(", ");
+ s = PyString_FromString(", ");
if (s == NULL)
goto Done;
- result = _PyBytes_Join(s, pieces);
+ result = _PyString_Join(s, pieces);
Py_DECREF(s);
Done: