diff options
Diffstat (limited to 'Include/modsupport.h')
-rw-r--r-- | Include/modsupport.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Include/modsupport.h b/Include/modsupport.h index ed24b2b..f17060c 100644 --- a/Include/modsupport.h +++ b/Include/modsupport.h @@ -66,7 +66,12 @@ PyAPI_FUNC(int) _PyArg_NoPositional(const char *funcname, PyObject *args); #define _PyArg_NoPositional(funcname, args) \ ((args) == NULL || _PyArg_NoPositional((funcname), (args))) -PyAPI_FUNC(void) _PyArg_BadArgument(const char *, const char *, PyObject *); +PyAPI_FUNC(void) _PyArg_BadArgument(const char *, int, const char *, PyObject *); +PyAPI_FUNC(int) _PyArg_CheckPositional(const char *, Py_ssize_t, + Py_ssize_t, Py_ssize_t); +#define _PyArg_CheckPositional(funcname, nargs, min, max) \ + (((min) <= (nargs) && (nargs) <= (max)) \ + || _PyArg_CheckPositional((funcname), (nargs), (min), (max))) #endif |