summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2005-08-17 02:19:36 (GMT)
committerRaymond Hettinger <python@rcn.com>2005-08-17 02:19:36 (GMT)
commitf81e45023e114dded93cb1745c01552d8309c39f (patch)
treef3968d8725adcbc6edf5b86d50670fab376a4ceb /Objects
parentf408ddf4a0f10f3d84a723c671a633c8146d4a69 (diff)
downloadcpython-f81e45023e114dded93cb1745c01552d8309c39f.zip
cpython-f81e45023e114dded93cb1745c01552d8309c39f.tar.gz
cpython-f81e45023e114dded93cb1745c01552d8309c39f.tar.bz2
Fix nits.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/dictobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index aaca5aa..e90aca4 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -113,7 +113,7 @@ equally good collision statistics, needed less code & used less memory.
*/
/* Object used as dummy key to fill deleted entries */
-static PyObject *dummy; /* Initialized by first call to newdictobject() */
+static PyObject *dummy = NULL; /* Initialized by first call to newdictobject() */
/* forward declarations */
static dictentry *
@@ -567,7 +567,7 @@ PyDict_SetItem(register PyObject *op, PyObject *key, PyObject *value)
*/
if (!(mp->ma_used > n_used && mp->ma_fill*3 >= (mp->ma_mask+1)*2))
return 0;
- return dictresize(mp, mp->ma_used*(mp->ma_used>50000 ? 2 : 4));
+ return dictresize(mp, (mp->ma_used>50000 ? mp->ma_used*2 : mp->ma_used*4));
}
int