From 18e08e5e6169d8780a5cb1e53dfe972902caf61c Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Fri, 18 Jan 2008 00:10:42 +0000 Subject: clearcache() needs to remove the dict as well as clear it. --- Modules/_struct.c | 3 +-- 1 file changed, 1 insertion(+), 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; } -- cgit v0.12