Added f_lasti and f_lineno members.
This commit is contained in:
parent
cff3454eff
commit
088bc2ad3c
|
@ -41,6 +41,8 @@ typedef struct _frame {
|
|||
int f_nvalues; /* size of f_valuestack */
|
||||
int f_nblocks; /* size of f_blockstack */
|
||||
int f_iblock; /* index in f_blockstack */
|
||||
int f_lasti; /* Last instruction if called */
|
||||
int f_lineno; /* Current line number */
|
||||
} frameobject;
|
||||
|
||||
|
||||
|
|
|
@ -38,6 +38,8 @@ static struct memberlist frame_memberlist[] = {
|
|||
{"f_code", T_OBJECT, OFF(f_code)},
|
||||
{"f_globals", T_OBJECT, OFF(f_globals)},
|
||||
{"f_locals", T_OBJECT, OFF(f_locals)},
|
||||
{"f_lasti", T_INT, OFF(f_lasti)},
|
||||
{"f_lineno", T_INT, OFF(f_lineno)},
|
||||
{NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
|
@ -118,6 +120,8 @@ newframeobject(back, code, globals, locals, nvalues, nblocks)
|
|||
DECREF(f);
|
||||
f = NULL;
|
||||
}
|
||||
f->f_lasti = 0;
|
||||
f->f_lineno = -1;
|
||||
}
|
||||
return f;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue