diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-01-28 22:55:37 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-01-28 22:55:37 (GMT) |
commit | 4b40c3e69ecd49121563b19cbe16e406c822a0ec (patch) | |
tree | 9dedb8d64ddaf15deede7bce60f0326145594118 /Modules | |
parent | 13ea0c5d9c3d1e88373af65ee11490077cfb2e80 (diff) | |
download | cpython-4b40c3e69ecd49121563b19cbe16e406c822a0ec.zip cpython-4b40c3e69ecd49121563b19cbe16e406c822a0ec.tar.gz cpython-4b40c3e69ecd49121563b19cbe16e406c822a0ec.tar.bz2 |
Fixed a crash in new tests in test_getargs2 added in 60a2d67dacb3 (issue #26198).
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_testcapimodule.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c index b53ef98..4e297dd 100644 --- a/Modules/_testcapimodule.c +++ b/Modules/_testcapimodule.c @@ -1149,7 +1149,7 @@ static PyObject * getargs_s_hash(PyObject *self, PyObject *args) { const char *str; - Py_ssize_t size; + int size; if (!PyArg_ParseTuple(args, "s#", &str, &size)) return NULL; return PyBytes_FromStringAndSize(str, size); @@ -1159,7 +1159,7 @@ static PyObject * getargs_t_hash(PyObject *self, PyObject *args) { const char *str; - Py_ssize_t size; + int size; if (!PyArg_ParseTuple(args, "t#", &str, &size)) return NULL; return PyBytes_FromStringAndSize(str, size); @@ -1198,7 +1198,7 @@ static PyObject * getargs_z_hash(PyObject *self, PyObject *args) { const char *str; - Py_ssize_t size; + int size; if (!PyArg_ParseTuple(args, "z#", &str, &size)) return NULL; if (str != NULL) @@ -1228,7 +1228,7 @@ static PyObject * getargs_w_hash(PyObject *self, PyObject *args) { char *str; - Py_ssize_t size; + int size; if (!PyArg_ParseTuple(args, "w#", &str, &size)) return NULL; @@ -1277,7 +1277,7 @@ static PyObject * getargs_u(PyObject *self, PyObject *args) { const Py_UNICODE *str; - Py_ssize_t size; + int size; if (!PyArg_ParseTuple(args, "u", &str)) return NULL; size = _ustrlen(str); @@ -1288,7 +1288,7 @@ static PyObject * getargs_u_hash(PyObject *self, PyObject *args) { const Py_UNICODE *str; - Py_ssize_t size; + int size; if (!PyArg_ParseTuple(args, "u#", &str, &size)) return NULL; return PyUnicode_FromUnicode(str, size); @@ -1335,7 +1335,7 @@ getargs_es_hash(PyObject *self, PyObject *args) const char *encoding = NULL; PyByteArrayObject *buffer = NULL; char *str = NULL; - Py_ssize_t size; + int size; if (!PyArg_ParseTuple(args, "O|sO!", &arg, &encoding, &PyByteArray_Type, &buffer)) @@ -1359,7 +1359,7 @@ getargs_et_hash(PyObject *self, PyObject *args) const char *encoding = NULL; PyByteArrayObject *buffer = NULL; char *str = NULL; - Py_ssize_t size; + int size; if (!PyArg_ParseTuple(args, "O|sO!", &arg, &encoding, &PyByteArray_Type, &buffer)) |