summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
Diffstat (limited to 'Objects')
-rw-r--r--Objects/abstract.c2
-rw-r--r--Objects/methodobject.c9
2 files changed, 8 insertions, 3 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c
index 6db8c26..f302281 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -2255,7 +2255,7 @@ _PyStack_AsTuple(PyObject **stack, Py_ssize_t nargs)
}
PyObject *
-_PyObject_FastCallDict(PyObject *func, PyObject **args, int nargs,
+_PyObject_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs,
PyObject *kwargs)
{
ternaryfunc call;
diff --git a/Objects/methodobject.c b/Objects/methodobject.c
index edb2fc0..394f1f4 100644
--- a/Objects/methodobject.c
+++ b/Objects/methodobject.c
@@ -146,15 +146,20 @@ PyCFunction_Call(PyObject *func, PyObject *args, PyObject *kwds)
}
PyObject *
-_PyCFunction_FastCallDict(PyObject *func_obj, PyObject **args, int nargs,
+_PyCFunction_FastCallDict(PyObject *func_obj, PyObject **args, Py_ssize_t nargs,
PyObject *kwargs)
{
- PyCFunctionObject* func = (PyCFunctionObject*)func_obj;
+ PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
PyCFunction meth = PyCFunction_GET_FUNCTION(func);
PyObject *self = PyCFunction_GET_SELF(func);
PyObject *result;
int flags;
+ assert(func != NULL);
+ assert(nargs >= 0);
+ assert(nargs == 0 || args != NULL);
+ assert(kwargs == NULL || PyDict_Check(kwargs));
+
/* _PyCFunction_FastCallDict() must not be called with an exception set,
because it may clear it (directly or indirectly) and so the
caller loses its exception */