mirror of
https://github.com/python/cpython.git
synced 2025-08-01 23:53:15 +00:00
tb_here() can now get the lasti and lineno arguments from the frame.
This commit is contained in:
parent
ee3a299c39
commit
c6515d12b7
1 changed files with 2 additions and 4 deletions
|
@ -112,13 +112,11 @@ newtracebackobject(next, frame, lasti, lineno)
|
||||||
static tracebackobject *tb_current = NULL;
|
static tracebackobject *tb_current = NULL;
|
||||||
|
|
||||||
int
|
int
|
||||||
tb_here(frame, lasti, lineno)
|
tb_here(frame)
|
||||||
frameobject *frame;
|
frameobject *frame;
|
||||||
int lasti;
|
|
||||||
int lineno;
|
|
||||||
{
|
{
|
||||||
tracebackobject *tb;
|
tracebackobject *tb;
|
||||||
tb = newtracebackobject(tb_current, frame, lasti, lineno);
|
tb = newtracebackobject(tb_current, frame, frame->f_lasti, frame->f_lineno);
|
||||||
if (tb == NULL)
|
if (tb == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
XDECREF(tb_current);
|
XDECREF(tb_current);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue