Skip to content

Commit 4fa9591

Browse files
bpo-35582: Argument Clinic: inline parsing code for positional parameters. (GH-11313)
1 parent 5485085 commit 4fa9591

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+6194
-778
lines changed

Include/modsupport.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,12 @@ PyAPI_FUNC(int) _PyArg_NoPositional(const char *funcname, PyObject *args);
6666
#define _PyArg_NoPositional(funcname, args) \
6767
((args) == NULL || _PyArg_NoPositional((funcname), (args)))
6868

69-
PyAPI_FUNC(void) _PyArg_BadArgument(const char *, const char *, PyObject *);
69+
PyAPI_FUNC(void) _PyArg_BadArgument(const char *, int, const char *, PyObject *);
70+
PyAPI_FUNC(int) _PyArg_CheckPositional(const char *, Py_ssize_t,
71+
Py_ssize_t, Py_ssize_t);
72+
#define _PyArg_CheckPositional(funcname, nargs, min, max) \
73+
(((min) <= (nargs) && (nargs) <= (max)) \
74+
|| _PyArg_CheckPositional((funcname), (nargs), (min), (max)))
7075

7176
#endif
7277

0 commit comments

Comments
 (0)