mirror of
https://github.com/python/cpython.git
synced 2025-08-01 23:53:15 +00:00
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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue