summaryrefslogtreecommitdiffstats
path: root/Objects/tupleobject.c
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2004-03-20 21:35:09 (GMT)
committerArmin Rigo <arigo@tunes.org>2004-03-20 21:35:09 (GMT)
commit7cdf3e8a8a36fd5ed4bb60f8820efa2f14b7dedc (patch)
tree23fe77cd7187cc7cf7a6a814a240d79f4a693ac7 /Objects/tupleobject.c
parentcc45466b8f066919a92b84b0d46c4cd40922df4d (diff)
downloadcpython-7cdf3e8a8a36fd5ed4bb60f8820efa2f14b7dedc.zip
cpython-7cdf3e8a8a36fd5ed4bb60f8820efa2f14b7dedc.tar.gz
cpython-7cdf3e8a8a36fd5ed4bb60f8820efa2f14b7dedc.tar.bz2
memset() hunt continuing. This is a net win.
Diffstat (limited to 'Objects/tupleobject.c')
-rw-r--r--Objects/tupleobject.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c
index 60878a4..159dc44 100644
--- a/Objects/tupleobject.c
+++ b/Objects/tupleobject.c
@@ -27,6 +27,7 @@ PyObject *
PyTuple_New(register int size)
{
register PyTupleObject *op;
+ int i;
if (size < 0) {
PyErr_BadInternalCall();
return NULL;
@@ -68,7 +69,8 @@ PyTuple_New(register int size)
if (op == NULL)
return NULL;
}
- memset(op->ob_item, 0, sizeof(*op->ob_item) * size);
+ for (i=0; i < size; i++)
+ op->ob_item[i] = NULL;
#if MAXSAVESIZE > 0
if (size == 0) {
free_tuples[0] = op;