]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Added f_lasti and f_lineno members.
authorGuido van Rossum <guido@python.org>
Tue, 14 Jan 1992 18:32:11 +0000 (18:32 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 14 Jan 1992 18:32:11 +0000 (18:32 +0000)
Include/frameobject.h
Objects/frameobject.c

index 22bdfa9c11eb6219188774d0a580d7ec5ea3a3d5..479664d25b308acbc12e473214377bd20416fb60 100644 (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;
 
 
index f86b64df32d1f31f34103283ab782425f851336a..212fbc97994118464e819ef5fafa744cd80ae1df 100644 (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;
 }