From 017f7780a88656172af93a2e164b20468fd9c45c Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 16 Nov 1998 18:56:03 +0000 Subject: [PATCH] Make tuples less hungry -- an extra item was allocated but never used. Tip by Vladimir Marangozov. --- Objects/tupleobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c index 9bc1fe7416b..2286b01dbe1 100644 --- a/Objects/tupleobject.c +++ b/Objects/tupleobject.c @@ -79,7 +79,7 @@ PyTuple_New(size) #endif { op = (PyTupleObject *) malloc( - sizeof(PyTupleObject) + size * sizeof(PyObject *)); + sizeof(PyTupleObject) + (size-1) * sizeof(PyObject *)); if (op == NULL) return PyErr_NoMemory();