From 088bc2ad3cdea6b9e042efe8863828334517f897 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 14 Jan 1992 18:32:11 +0000 Subject: Added f_lasti and f_lineno members. --- Include/frameobject.h | 2 ++ Objects/frameobject.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/Include/frameobject.h b/Include/frameobject.h index 22bdfa9..479664d 100644 --- a/Include/frameobject.h +++ b/Include/frameobject.h @@ -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; diff --git a/Objects/frameobject.c b/Objects/frameobject.c index f86b64d..212fbc9 100644 --- a/Objects/frameobject.c +++ b/Objects/frameobject.c @@ -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; } -- cgit v0.12