commit | 18e08e5e6169d8780a5cb1e53dfe972902caf61c | [log] [tgz] |
---|---|---|
author | Raymond Hettinger <python@rcn.com> | Fri Jan 18 00:10:42 2008 +0000 |
committer | Raymond Hettinger <python@rcn.com> | Fri Jan 18 00:10:42 2008 +0000 |
tree | 1213c997b122f3c28593334d02523043cb3eb6e8 | |
parent | 64cd1e2d9122ffd5153bc52b7a7e1a117210043b [diff] |
clearcache() needs to remove the dict as well as clear it.
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 @@ static PyObject * clearcache(PyObject *self) { - if (cache != NULL) - PyDict_Clear(cache); + Py_CLEAR(cache); Py_RETURN_NONE; }