summaryrefslogtreecommitdiffstats
path: root/Modules/_testcapimodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_testcapimodule.c')
-rw-r--r--Modules/_testcapimodule.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index 2d4c73c..b8f71d4 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -4918,8 +4918,10 @@ meth_fastcall_keywords(PyObject* self, PyObject* const* args,
if (pyargs == NULL) {
return NULL;
}
+ assert(args != NULL || nargs == 0);
+ PyObject* const* args_offset = args == NULL ? NULL : args + nargs;
PyObject *pykwargs = PyObject_Vectorcall((PyObject*)&PyDict_Type,
- args + nargs, 0, kwargs);
+ args_offset, 0, kwargs);
return Py_BuildValue("NNN", _null_to_none(self), pyargs, pykwargs);
}