Added f_lasti and f_lineno members.

This commit is contained in:
Guido van Rossum 1992-01-14 18:32:11 +00:00
parent cff3454eff
commit 088bc2ad3c
2 changed files with 6 additions and 0 deletions

View File

@ -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;

View File

@ -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;
}