8000 gh-129594: Remove redundant check on varargs in `_PyArg_CheckPosition… · faster-cpython/cpython@fb09db1 · GitHub
[go: up one dir, main page]

Skip to content

Commit fb09db1

Browse files
authored
pythongh-129594: Remove redundant check on varargs in _PyArg_CheckPositional (python#129595)
1 parent cf8941c commit fb09db1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Include/internal/pycore_modsupport.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@ PyAPI_FUNC(int) _PyArg_NoKeywords(const char *funcname, PyObject *kwargs);
2727
// Export for 'zlib' shared extension
2828
PyAPI_FUNC(int) _PyArg_CheckPositional(const char *, Py_ssize_t,
2929
Py_ssize_t, Py_ssize_t);
30-
#define _Py_ANY_VARARGS(n) ((n) == PY_SSIZE_T_MAX)
3130
#define _PyArg_CheckPositional(funcname, nargs, min, max) \
32-
((!_Py_ANY_VARARGS(max) && (min) <= (nargs) && (nargs) <= (max)) \
31+
(((min) <= (nargs) && (nargs) <= (max)) \
3332
|| _PyArg_CheckPositional((funcname), (nargs), (min), (max)))
3433

3534
extern PyObject ** _Py_VaBuildStack(

0 commit comments

Comments
 (0)
0