mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
SF patch #1020188: Use Py_CLEAR where necessary to avoid crashes
(Contributed by Dima Dorfman)
This commit is contained in:
parent
410eb84a5d
commit
75ccea3777
5 changed files with 8 additions and 17 deletions
|
@ -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); \
|
||||
} \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue