summaryrefslogtreecommitdiffstats
path: root/Objects/unicodeobject.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-10-23 12:12:25 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-10-23 12:12:25 (GMT)
commitf8d7d41507d8c0855b58c9be14011381d03c5cde (patch)
tree1a38be5e64aaf4c64a7581f209548818926cdb0f /Objects/unicodeobject.c
parent8c9331057d0f5c75cd3e73f3f85fe237da0f9ed1 (diff)
downloadcpython-f8d7d41507d8c0855b58c9be14011381d03c5cde.zip
cpython-f8d7d41507d8c0855b58c9be14011381d03c5cde.tar.gz
cpython-f8d7d41507d8c0855b58c9be14011381d03c5cde.tar.bz2
Issue #28511: Use the "U" format instead of "O!" in PyArg_Parse*.
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r--Objects/unicodeobject.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index af95bb6..6ab691f 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -8621,7 +8621,7 @@ unicode_translate_call_errorhandler(const char *errors,
Py_ssize_t startpos, Py_ssize_t endpos,
Py_ssize_t *newpos)
{
- static const char *argparse = "O!n;translating error handler must return (str, int) tuple";
+ static const char *argparse = "Un;translating error handler must return (str, int) tuple";
Py_ssize_t i_newpos;
PyObject *restuple;
@@ -8643,11 +8643,11 @@ unicode_translate_call_errorhandler(const char *errors,
if (restuple == NULL)
return NULL;
if (!PyTuple_Check(restuple)) {
- PyErr_SetString(PyExc_TypeError, &argparse[4]);
+ PyErr_SetString(PyExc_TypeError, &argparse[3]);
Py_DECREF(restuple);
return NULL;
}
- if (!PyArg_ParseTuple(restuple, argparse, &PyUnicode_Type,
+ if (!PyArg_ParseTuple(restuple, argparse,
&resunicode, &i_newpos)) {
Py_DECREF(restuple);
return NULL;