Issue #22207: Fix "comparison between signed and unsigned integers" warning in
test checking for integer overflow on Py_ssize_t type: cast explicitly to
size_t.
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c
index 753097b..e45462b 100644
--- a/Objects/tupleobject.c
+++ b/Objects/tupleobject.c
@@ -97,7 +97,7 @@
#endif
{
/* Check for overflow */
- if (size > (PY_SSIZE_T_MAX - sizeof(PyTupleObject) -
+ if ((size_t)size > ((size_t)PY_SSIZE_T_MAX - sizeof(PyTupleObject) -
sizeof(PyObject *)) / sizeof(PyObject *)) {
return PyErr_NoMemory();
}