summaryrefslogtreecommitdiffstats
path: root/Modules/_struct.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_struct.c')
-rw-r--r--Modules/_struct.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/_struct.c b/Modules/_struct.c
index 278b035..dcf315e 100644
--- a/Modules/_struct.c
+++ b/Modules/_struct.c
@@ -1918,8 +1918,7 @@ PyDoc_STRVAR(clearcache_doc,
static PyObject *
clearcache(PyObject *self)
{
- if (cache != NULL)
- PyDict_Clear(cache);
+ Py_CLEAR(cache);
Py_RETURN_NONE;
}