summaryrefslogtreecommitdiff
path: root/Include/object.h
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-09-01 07:02:44 +0000
committerRaymond Hettinger <python@rcn.com>2004-09-01 07:02:44 +0000
commit424f523bd9c84b833b99c3166126b930b44390bf (patch)
tree2dfcc6cdbedeec78111a4d89f7c3e99dce14ccc3 /Include/object.h
parent40d1e78c1785f6671ba8460fcc5c3d5ad2fece76 (diff)
downloadcpython-424f523bd9c84b833b99c3166126b930b44390bf.tar.gz
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 5db4dac061..258b074496 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); \
} \