mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Renamed PyString to PyBytes
This commit is contained in:
parent
c3cb683d63
commit
593daf545b
176 changed files with 2793 additions and 2791 deletions
|
|
@ -19,7 +19,7 @@ this type and there is exactly one in existence.
|
|||
static PyObject *
|
||||
ellipsis_repr(PyObject *op)
|
||||
{
|
||||
return PyString_FromString("Ellipsis");
|
||||
return PyBytes_FromString("Ellipsis");
|
||||
}
|
||||
|
||||
static PyTypeObject PyEllipsis_Type = {
|
||||
|
|
@ -228,14 +228,14 @@ slice_repr(PySliceObject *r)
|
|||
{
|
||||
PyObject *s, *comma;
|
||||
|
||||
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(")"));
|
||||
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(")"));
|
||||
Py_DECREF(comma);
|
||||
return s;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue