Make tuples less hungry -- an extra item was allocated but never used.

Tip by Vladimir Marangozov.
This commit is contained in:
Guido van Rossum 1998-11-16 18:56:03 +00:00
parent 72fe0859d0
commit 017f7780a8
1 changed files with 1 additions and 1 deletions

View File

@ -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();