diff options
author | Raymond Hettinger <python@rcn.com> | 2008-01-18 00:10:42 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2008-01-18 00:10:42 (GMT) |
commit | 18e08e5e6169d8780a5cb1e53dfe972902caf61c (patch) | |
tree | 1213c997b122f3c28593334d02523043cb3eb6e8 /Modules | |
parent | 64cd1e2d9122ffd5153bc52b7a7e1a117210043b (diff) | |
download | cpython-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.c | 3 |
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; } |