diff Include/object.h @ 33386:c2c49ee727d0 legacy-trunk

SF patch #1020188: Use Py_CLEAR where necessary to avoid crashes (Contributed by Dima Dorfman)
author Raymond Hettinger <python@rcn.com>
date Wed, 01 Sep 2004 07:02:44 +0000
parents 1e2187f50631
children 781aef974463
line wrap: on
line diff
--- a/Include/object.h	Wed Sep 01 04:05:08 2004 +0000
+++ b/Include/object.h	Wed Sep 01 07:02:44 2004 +0000
@@ -623,7 +623,7 @@
 #define Py_CLEAR(op)				\
         do {                            	\
                 if (op) {			\
-                        PyObject *tmp = (op);	\
+                        PyObject *tmp = (PyObject *)(op);	\
                         (op) = NULL;		\
                         Py_DECREF(tmp);		\
                 }				\