diff options
author | Christian Heimes <christian@cheimes.de> | 2008-05-26 13:28:38 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2008-05-26 13:28:38 (GMT) |
commit | 72b710a59617ebe6dd1c41613d2c7eb81702efd9 (patch) | |
tree | cd134cc11c49ba09f50e44a9f36b69f2b0ffc893 /Objects/bytesobject.c | |
parent | 9c4756ea265b5ebd71c9ae59f3673c7cecb6f060 (diff) | |
download | cpython-72b710a59617ebe6dd1c41613d2c7eb81702efd9.zip cpython-72b710a59617ebe6dd1c41613d2c7eb81702efd9.tar.gz cpython-72b710a59617ebe6dd1c41613d2c7eb81702efd9.tar.bz2 |
Renamed PyString to PyBytes
Diffstat (limited to 'Objects/bytesobject.c')
-rw-r--r-- | Objects/bytesobject.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index 98dc0f7..0a83725 100644 --- a/Objects/bytesobject.c +++ b/Objects/bytesobject.c @@ -728,7 +728,7 @@ bytes_init(PyByteArrayObject *self, PyObject *args, PyObject *kwds) encoded = PyCodec_Encode(arg, encoding, errors); if (encoded == NULL) return -1; - assert(PyString_Check(encoded)); + assert(PyBytes_Check(encoded)); new = bytes_iconcat(self, encoded); Py_DECREF(encoded); if (new == NULL) @@ -2895,7 +2895,7 @@ bytes_join(PyByteArrayObject *self, PyObject *it) /* XXX Shouldn't we use _getbuffer() on these items instead? */ for (i = 0; i < n; i++) { PyObject *obj = items[i]; - if (!PyByteArray_Check(obj) && !PyString_Check(obj)) { + if (!PyByteArray_Check(obj) && !PyBytes_Check(obj)) { PyErr_Format(PyExc_TypeError, "can only join an iterable of bytes " "(item %ld has type '%.100s')", @@ -2924,7 +2924,7 @@ bytes_join(PyByteArrayObject *self, PyObject *it) if (PyByteArray_Check(obj)) buf = PyByteArray_AS_STRING(obj); else - buf = PyString_AS_STRING(obj); + buf = PyBytes_AS_STRING(obj); if (i) { memcpy(dest, self->ob_bytes, mysize); dest += mysize; |