mirror of
https://github.com/python/cpython.git
synced 2025-07-23 03:05:38 +00:00
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.
This commit is contained in:
parent
ce298a1c15
commit
7284e0ef84
5 changed files with 64 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue