mirror of
https://github.com/python/cpython.git
synced 2025-11-02 19:12:55 +00:00
Call PyObject_GC_UnTrack before putting an object on the list of trash.
This commit is contained in:
parent
f589c059f4
commit
835840560b
1 changed files with 2 additions and 2 deletions
|
|
@ -35,8 +35,8 @@ tb_getattr(tracebackobject *tb, char *name)
|
||||||
static void
|
static void
|
||||||
tb_dealloc(tracebackobject *tb)
|
tb_dealloc(tracebackobject *tb)
|
||||||
{
|
{
|
||||||
|
PyObject_GC_UnTrack(tb);
|
||||||
Py_TRASHCAN_SAFE_BEGIN(tb)
|
Py_TRASHCAN_SAFE_BEGIN(tb)
|
||||||
_PyObject_GC_UNTRACK(tb);
|
|
||||||
Py_XDECREF(tb->tb_next);
|
Py_XDECREF(tb->tb_next);
|
||||||
Py_XDECREF(tb->tb_frame);
|
Py_XDECREF(tb->tb_frame);
|
||||||
PyObject_GC_Del(tb);
|
PyObject_GC_Del(tb);
|
||||||
|
|
@ -120,7 +120,7 @@ newtracebackobject(tracebackobject *next, PyFrameObject *frame, int lasti,
|
||||||
tb->tb_frame = frame;
|
tb->tb_frame = frame;
|
||||||
tb->tb_lasti = lasti;
|
tb->tb_lasti = lasti;
|
||||||
tb->tb_lineno = lineno;
|
tb->tb_lineno = lineno;
|
||||||
_PyObject_GC_TRACK(tb);
|
PyObject_GC_Track(tb);
|
||||||
}
|
}
|
||||||
return tb;
|
return tb;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue