diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-01-05 19:27:54 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-01-05 19:27:54 (GMT) |
commit | 576f132b986b5ee60e4b84d34a519a5edcd8c03e (patch) | |
tree | f048292ddc0b5c3d6a5afc50dc2cd4b28372c655 /Python/sysmodule.c | |
parent | dcf76c9d0ab11f77eaa856ff0583c5c636ddb47d (diff) | |
download | cpython-576f132b986b5ee60e4b84d34a519a5edcd8c03e.zip cpython-576f132b986b5ee60e4b84d34a519a5edcd8c03e.tar.gz cpython-576f132b986b5ee60e4b84d34a519a5edcd8c03e.tar.bz2 |
Issue #20440: Cleaning up the code by using Py_SETREF.
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r-- | Python/sysmodule.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c index f784f75..53dd4a1 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -436,10 +436,7 @@ trace_trampoline(PyObject *self, PyFrameObject *frame, return -1; } if (result != Py_None) { - PyObject *temp = frame->f_trace; - frame->f_trace = NULL; - Py_XDECREF(temp); - frame->f_trace = result; + Py_SETREF(frame->f_trace, result); } else { Py_DECREF(result); |