summaryrefslogtreecommitdiffstats
path: root/Include/object.h
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-09-01 07:02:44 (GMT)
committerRaymond Hettinger <python@rcn.com>2004-09-01 07:02:44 (GMT)
commit75ccea3777f77f001102493170490874166eb3b2 (patch)
tree31c6cc1fc38e8928475d7dd3a04fe3e3d0b0a33c /Include/object.h
parent410eb84a5d4e582491701d63d154959c05a457f4 (diff)
downloadcpython-75ccea3777f77f001102493170490874166eb3b2.zip
cpython-75ccea3777f77f001102493170490874166eb3b2.tar.gz
cpython-75ccea3777f77f001102493170490874166eb3b2.tar.bz2
SF patch #1020188: Use Py_CLEAR where necessary to avoid crashes
(Contributed by Dima Dorfman)
Diffstat (limited to 'Include/object.h')
-rw-r--r--Include/object.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Include/object.h b/Include/object.h
index 5db4dac..258b074 100644
--- a/Include/object.h
+++ b/Include/object.h
@@ -623,7 +623,7 @@ PyAPI_FUNC(void) _Py_AddToAllObjects(PyObject *, int force);
#define Py_CLEAR(op) \
do { \
if (op) { \
- PyObject *tmp = (op); \
+ PyObject *tmp = (PyObject *)(op); \
(op) = NULL; \
Py_DECREF(tmp); \
} \