summaryrefslogtreecommitdiffstats
path: root/Include/cpython
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2022-06-13 14:24:19 (GMT)
committerGitHub <noreply@github.com>2022-06-13 14:24:19 (GMT)
commit65ac273280fa909f42dd78f3da634e6669e2b63d (patch)
tree220352ce5330a61444117a439b84bf3971eef8d5 /Include/cpython
parent272bec4adfe80ca375b4b12b2c2479a0988bf069 (diff)
downloadcpython-65ac273280fa909f42dd78f3da634e6669e2b63d.zip
cpython-65ac273280fa909f42dd78f3da634e6669e2b63d.tar.gz
cpython-65ac273280fa909f42dd78f3da634e6669e2b63d.tar.bz2
Remove ANY_VARARGS() macro from the C API (#93764)
The macro was exposed by mistake.
Diffstat (limited to 'Include/cpython')
-rw-r--r--Include/cpython/modsupport.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/Include/cpython/modsupport.h b/Include/cpython/modsupport.h
index 769eb52..74ef999 100644
--- a/Include/cpython/modsupport.h
+++ b/Include/cpython/modsupport.h
@@ -34,11 +34,13 @@ PyAPI_FUNC(int) _PyArg_NoPositional(const char *funcname, PyObject *args);
#define _PyArg_NoPositional(funcname, args) \
((args) == NULL || _PyArg_NoPositional((funcname), (args)))
+#define _Py_ANY_VARARGS(n) (n == PY_SSIZE_T_MAX)
+
PyAPI_FUNC(void) _PyArg_BadArgument(const char *, const char *, 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) \
- ((!ANY_VARARGS(max) && (min) <= (nargs) && (nargs) <= (max)) \
+ ((!_Py_ANY_VARARGS(max) && (min) <= (nargs) && (nargs) <= (max)) \
|| _PyArg_CheckPositional((funcname), (nargs), (min), (max)))
PyAPI_FUNC(PyObject **) _Py_VaBuildStack(