diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2023-10-14 05:50:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-14 05:50:03 (GMT) |
commit | 7284e0ef84e53f80b2e60c3f51e3467d67a275f3 (patch) | |
tree | ccc8b2aecb45f767c08b9b4b934bfe99ce76ef47 /Python/getargs.c | |
parent | ce298a1c1566467e7fd459c8f61478a26f42833e (diff) | |
download | cpython-7284e0ef84e53f80b2e60c3f51e3467d67a275f3.zip cpython-7284e0ef84e53f80b2e60c3f51e3467d67a275f3.tar.gz cpython-7284e0ef84e53f80b2e60c3f51e3467d67a275f3.tar.bz2 |
gh-110815: Support non-ASCII keyword names in PyArg_ParseTupleAndKeywords() (GH-110816)
It already mostly worked, except in the case when invalid keyword
argument with non-ASCII name was passed to function with non-ASCII
parameter names. Then it crashed in the debug mode.
Diffstat (limited to 'Python/getargs.c')
-rw-r--r-- | Python/getargs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/getargs.c b/Python/getargs.c index d590e2e..a0eef2c 100644 --- a/Python/getargs.c +++ b/Python/getargs.c @@ -1729,7 +1729,7 @@ vgetargskeywords(PyObject *args, PyObject *kwargs, const char *format, return cleanreturn(0, &freelist); } for (i = pos; i < len; i++) { - if (_PyUnicode_EqualToASCIIString(key, kwlist[i])) { + if (PyUnicode_EqualToUTF8(key, kwlist[i])) { match = 1; break; } |