mirror of
https://github.com/python/cpython.git
synced 2025-09-17 14:16:02 +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
|
#endif
|
||||||
{
|
{
|
||||||
op = (PyTupleObject *) malloc(
|
op = (PyTupleObject *) malloc(
|
||||||
sizeof(PyTupleObject) + size * sizeof(PyObject *));
|
sizeof(PyTupleObject) + (size-1) * sizeof(PyObject *));
|
||||||
if (op == NULL)
|
if (op == NULL)
|
||||||
return PyErr_NoMemory();
|
return PyErr_NoMemory();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue