mirror of https://github.com/python/cpython.git
Make tuples less hungry -- an extra item was allocated but never used.
Tip by Vladimir Marangozov.
This commit is contained in:
parent
72fe0859d0
commit
017f7780a8
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue