diff Modules/_struct.c @ 44733:85cf220f16d8 legacy-trunk

clearcache() needs to remove the dict as well as clear it.
author Raymond Hettinger <python@rcn.com>
date Fri, 18 Jan 2008 00:10:42 +0000
parents 7643a43f25a1
children f378edd21df2
line wrap: on
line diff
--- a/Modules/_struct.c	Thu Jan 17 23:56:56 2008 +0000
+++ b/Modules/_struct.c	Fri Jan 18 00:10:42 2008 +0000
@@ -1887,8 +1887,7 @@
 static PyObject *
 clearcache(PyObject *self)
 {
-	if (cache != NULL)
-		PyDict_Clear(cache);
+	Py_CLEAR(cache);
 	Py_RETURN_NONE;
 }