Commit a2525b33 authored by Guido van Rossum's avatar Guido van Rossum

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

Tip by Vladimir Marangozov.
parent 1f16a428
......@@ -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();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment