Mercurial > cpython-lru_cache-weakref
diff Objects/tupleobject.c @ 9484:d84715523095 legacy-trunk
Make tuples less hungry -- an extra item was allocated but never used.
Tip by Vladimir Marangozov.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Mon, 16 Nov 1998 18:56:03 +0000 |
| parents | 92267838feb9 |
| children | ac5345814ba0 |
line wrap: on
line diff
--- a/Objects/tupleobject.c Mon Nov 16 18:37:42 1998 +0000 +++ b/Objects/tupleobject.c Mon Nov 16 18:56:03 1998 +0000 @@ -79,7 +79,7 @@ #endif { op = (PyTupleObject *) malloc( - sizeof(PyTupleObject) + size * sizeof(PyObject *)); + sizeof(PyTupleObject) + (size-1) * sizeof(PyObject *)); if (op == NULL) return PyErr_NoMemory();
