mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
Issue #20440: Cleaning up the code by using Py_SETREF.
This commit is contained in:
parent
dcf76c9d0a
commit
576f132b98
14 changed files with 39 additions and 120 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue