From 576f132b986b5ee60e4b84d34a519a5edcd8c03e Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Tue, 5 Jan 2016 21:27:54 +0200 Subject: Issue #20440: Cleaning up the code by using Py_SETREF. --- Python/sysmodule.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'Python/sysmodule.c') diff --git a/Python/sysmodule.c b/Python/sysmodule.c index f784f756d5..53dd4a1df3 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); -- cgit v1.2.1