diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-07-23 15:25:54 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-23 15:25:54 (GMT) |
commit | 5ec275758dbc307e9838e7038bfc3b5390950ea7 (patch) | |
tree | 576aeb57c1f9560017aa5d052bf288d3966788e4 /Modules/clinic | |
parent | 632e8a69593efb12ec58d90e624ddf249a7a1b65 (diff) | |
download | cpython-5ec275758dbc307e9838e7038bfc3b5390950ea7.zip cpython-5ec275758dbc307e9838e7038bfc3b5390950ea7.tar.gz cpython-5ec275758dbc307e9838e7038bfc3b5390950ea7.tar.bz2 |
bpo-42854: Correctly use size_t for _ssl._SSLSocket.read and _ssl._SSLSocket.write (GH-27271) (GH-27308)
(cherry picked from commit 83d1430ee5b8008631e7f2a75447e740eed065c1)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Diffstat (limited to 'Modules/clinic')
-rw-r--r-- | Modules/clinic/_ssl.c.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Modules/clinic/_ssl.c.h b/Modules/clinic/_ssl.c.h index b153c30..b59b129 100644 --- a/Modules/clinic/_ssl.c.h +++ b/Modules/clinic/_ssl.c.h @@ -271,25 +271,25 @@ PyDoc_STRVAR(_ssl__SSLSocket_read__doc__, {"read", (PyCFunction)_ssl__SSLSocket_read, METH_VARARGS, _ssl__SSLSocket_read__doc__}, static PyObject * -_ssl__SSLSocket_read_impl(PySSLSocket *self, int len, int group_right_1, - Py_buffer *buffer); +_ssl__SSLSocket_read_impl(PySSLSocket *self, Py_ssize_t len, + int group_right_1, Py_buffer *buffer); static PyObject * _ssl__SSLSocket_read(PySSLSocket *self, PyObject *args) { PyObject *return_value = NULL; - int len; + Py_ssize_t len; int group_right_1 = 0; Py_buffer buffer = {NULL, NULL}; switch (PyTuple_GET_SIZE(args)) { case 1: - if (!PyArg_ParseTuple(args, "i:read", &len)) { + if (!PyArg_ParseTuple(args, "n:read", &len)) { goto exit; } break; case 2: - if (!PyArg_ParseTuple(args, "iw*:read", &len, &buffer)) { + if (!PyArg_ParseTuple(args, "nw*:read", &len, &buffer)) { goto exit; } group_right_1 = 1; @@ -1358,4 +1358,4 @@ exit: #ifndef _SSL_ENUM_CRLS_METHODDEF #define _SSL_ENUM_CRLS_METHODDEF #endif /* !defined(_SSL_ENUM_CRLS_METHODDEF) */ -/*[clinic end generated code: output=3b6f4471fb187d85 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=5a7d7bf5cf8ee092 input=a9049054013a1b77]*/ |