Issue #18531: Single var-keyword argument of dict subtype was passed

unscathed to the C-defined function.  Now it is converted to exact dict.
This commit is contained in:
Serhiy Storchaka 2016-05-08 23:36:44 +03:00
parent a26e4b97d8
commit ce41287e99
4 changed files with 82 additions and 1 deletions

View file

@ -4993,7 +4993,7 @@ ext_do_call(PyObject *func, PyObject ***pp_stack, int flags, int na, int nk)
if (flags & CALL_FLAG_KW) {
kwdict = EXT_POP(*pp_stack);
if (!PyDict_Check(kwdict)) {
if (!PyDict_CheckExact(kwdict)) {
PyObject *d;
d = PyDict_New();
if (d == NULL)