diff options
author | Raymond Hettinger <python@rcn.com> | 2008-01-18 00:10:42 +0000 |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2008-01-18 00:10:42 +0000 |
commit | a426f4c8b7b755bbcc0743ca13b316cf8ef3904a (patch) | |
tree | d4e3d89d1c53973a6083403ab3520981ecf596db /Modules/_struct.c | |
parent | 95bccad4e9c9319b85b3e3a24d8d461150794385 (diff) | |
download | cpython-a426f4c8b7b755bbcc0743ca13b316cf8ef3904a.tar.gz |
clearcache() needs to remove the dict as well as clear it.
Diffstat (limited to 'Modules/_struct.c')
-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 41cdca7062..6149964ecc 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; } |