summaryrefslogtreecommitdiffstats
path: root/Modules/_ssl.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-05-26 13:22:05 (GMT)
committerChristian Heimes <christian@cheimes.de>2008-05-26 13:22:05 (GMT)
commit9c4756ea265b5ebd71c9ae59f3673c7cecb6f060 (patch)
tree642b21e774a9cb2d949e10ce65e7d10326c70138 /Modules/_ssl.c
parent96d02f3c1e145821cd5ce8817d4263e7d8d57e4a (diff)
downloadcpython-9c4756ea265b5ebd71c9ae59f3673c7cecb6f060.zip
cpython-9c4756ea265b5ebd71c9ae59f3673c7cecb6f060.tar.gz
cpython-9c4756ea265b5ebd71c9ae59f3673c7cecb6f060.tar.bz2
Renamed PyBytes to PyByteArray
Diffstat (limited to 'Modules/_ssl.c')
-rw-r--r--Modules/_ssl.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index 296a425..beb212f 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -1263,16 +1263,16 @@ static PyObject *PySSL_SSLread(PySSLObject *self, PyObject *args)
if (!PyArg_ParseTuple(args, "|Oi:read", &buf, &count))
return NULL;
if ((buf == NULL) || (buf == Py_None)) {
- if (!(buf = PyBytes_FromStringAndSize((char *) 0, len)))
+ if (!(buf = PyByteArray_FromStringAndSize((char *) 0, len)))
return NULL;
} else if (PyLong_Check(buf)) {
len = PyLong_AS_LONG(buf);
- if (!(buf = PyBytes_FromStringAndSize((char *) 0, len)))
+ if (!(buf = PyByteArray_FromStringAndSize((char *) 0, len)))
return NULL;
} else {
- if (!PyBytes_Check(buf))
+ if (!PyByteArray_Check(buf))
return NULL;
- len = PyBytes_Size(buf);
+ len = PyByteArray_Size(buf);
if ((count > 0) && (count <= len))
len = count;
buf_passed = 1;
@@ -1313,7 +1313,7 @@ static PyObject *PySSL_SSLread(PySSLObject *self, PyObject *args)
do {
err = 0;
PySSL_BEGIN_ALLOW_THREADS
- count = SSL_read(self->ssl, PyBytes_AsString(buf), len);
+ count = SSL_read(self->ssl, PyByteArray_AsString(buf), len);
err = SSL_get_error(self->ssl, count);
PySSL_END_ALLOW_THREADS
if(PyErr_CheckSignals()) {
@@ -1357,7 +1357,7 @@ static PyObject *PySSL_SSLread(PySSLObject *self, PyObject *args)
done:
if (!buf_passed) {
PyObject *res = PyString_FromStringAndSize(
- PyBytes_AS_STRING(buf), count);
+ PyByteArray_AS_STRING(buf), count);
Py_DECREF(buf);
return res;
} else {