summaryrefslogtreecommitdiffstats
path: root/Objects/tupleobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/tupleobject.c')
-rw-r--r--Objects/tupleobject.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c
index c0b59c0..1453463 100644
--- a/Objects/tupleobject.c
+++ b/Objects/tupleobject.c
@@ -486,8 +486,7 @@ tupleconcat(PyTupleObject *a, PyObject *bb)
Py_INCREF(a);
return (PyObject *)a;
}
- if (Py_SIZE(a) > PY_SSIZE_T_MAX - Py_SIZE(b))
- return PyErr_NoMemory();
+ assert((size_t)Py_SIZE(a) + (size_t)Py_SIZE(b) < PY_SSIZE_T_MAX);
size = Py_SIZE(a) + Py_SIZE(b);
if (size == 0) {
return PyTuple_New(0);