https://github.com/python/cpython/commit/fb09db1b934a51e52e46dc64d7e5e84fe69e6160
commit: fb09db1b934a51e52e46dc64d7e5e84fe69e6160
branch: main
author: Pieter Eendebak <[email protected]>
committer: picnixz <[email protected]>
date: 2025-05-26T10:51:12+02:00
summary:
gh-129594: Remove redundant check on varargs in `_PyArg_CheckPositional`
(#129595)
files:
M Include/internal/pycore_modsupport.h
diff --git a/Include/internal/pycore_modsupport.h
b/Include/internal/pycore_modsupport.h
index 614e9f93751834..d90f42e9cd8b07 100644
--- a/Include/internal/pycore_modsupport.h
+++ b/Include/internal/pycore_modsupport.h
@@ -27,9 +27,8 @@ PyAPI_FUNC(int) _PyArg_NoKeywords(const char *funcname,
PyObject *kwargs);
// Export for 'zlib' shared extension
PyAPI_FUNC(int) _PyArg_CheckPositional(const char *, Py_ssize_t,
Py_ssize_t, Py_ssize_t);
-#define _Py_ANY_VARARGS(n) ((n) == PY_SSIZE_T_MAX)
#define _PyArg_CheckPositional(funcname, nargs, min, max) \
- ((!_Py_ANY_VARARGS(max) && (min) <= (nargs) && (nargs) <= (max)) \
+ (((min) <= (nargs) && (nargs) <= (max)) \
|| _PyArg_CheckPositional((funcname), (nargs), (min), (max)))
extern PyObject ** _Py_VaBuildStack(
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]