_PyStack_UnpackDict() now returns -1 on error

Issue #29286. Change _PyStack_UnpackDict() prototype to be able to notify of
failure when args is NULL.
This commit is contained in:
Victor Stinner 2017-01-17 01:57:29 +01:00
parent 29d39cc8f5
commit 998c20962c
3 changed files with 19 additions and 14 deletions

View file

@ -240,8 +240,8 @@ _PyCFunction_FastCallDict(PyObject *func_obj, PyObject **args, Py_ssize_t nargs,
PyObject *kwnames;
_PyCFunctionFast fastmeth = (_PyCFunctionFast)meth;
stack = _PyStack_UnpackDict(args, nargs, kwargs, &kwnames, func_obj);
if (stack == NULL) {
if (_PyStack_UnpackDict(args, nargs, kwargs,
&stack, &kwnames, func_obj) < 0) {
return NULL;
}