summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2008-01-18 00:10:42 (GMT)
committerRaymond Hettinger <python@rcn.com>2008-01-18 00:10:42 (GMT)
commit18e08e5e6169d8780a5cb1e53dfe972902caf61c (patch)
tree1213c997b122f3c28593334d02523043cb3eb6e8 /Modules
parent64cd1e2d9122ffd5153bc52b7a7e1a117210043b (diff)
downloadcpython-18e08e5e6169d8780a5cb1e53dfe972902caf61c.zip
cpython-18e08e5e6169d8780a5cb1e53dfe972902caf61c.tar.gz
cpython-18e08e5e6169d8780a5cb1e53dfe972902caf61c.tar.bz2
clearcache() needs to remove the dict as well as clear it.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_struct.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/_struct.c b/Modules/_struct.c
index 41cdca7..6149964 100644
--- a/Modules/_struct.c
+++ b/Modules/_struct.c
@@ -1887,8 +1887,7 @@ PyDoc_STRVAR(clearcache_doc,
static PyObject *
clearcache(PyObject *self)
{
- if (cache != NULL)
- PyDict_Clear(cache);
+ Py_CLEAR(cache);
Py_RETURN_NONE;
}