diff options
author | Guido van Rossum <guido@python.org> | 1998-11-16 18:56:03 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-11-16 18:56:03 (GMT) |
commit | 017f7780a88656172af93a2e164b20468fd9c45c (patch) | |
tree | f0439aae757ebc18ea290ddf3df126c0b0e318b4 /Objects | |
parent | 72fe0859d07368950f4e3d2919df442ed0dbd019 (diff) | |
download | cpython-017f7780a88656172af93a2e164b20468fd9c45c.zip cpython-017f7780a88656172af93a2e164b20468fd9c45c.tar.gz cpython-017f7780a88656172af93a2e164b20468fd9c45c.tar.bz2 |
Make tuples less hungry -- an extra item was allocated but never used.
Tip by Vladimir Marangozov.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/tupleobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c index 9bc1fe7..2286b01 100644 --- a/Objects/tupleobject.c +++ b/Objects/tupleobject.c @@ -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(); |