bpo-30524: Fix _PyStack_UnpackDict() (#1886)
* bpo-29259: Remove unused func parameter of _PyStack_UnpackDict()
* bpo-29286: Change _PyStack_UnpackDict() prototype to be able to
notify of failure when args is NULL. _PyStack_UnpackDict() now
returns -1 on error.
diff --git a/Objects/methodobject.c b/Objects/methodobject.c
index c2001f0..fe52545 100644
--- a/Objects/methodobject.c
+++ b/Objects/methodobject.c
@@ -243,8 +243,7 @@
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) < 0) {
return NULL;
}