Skip to content

Commit

Permalink
GH-100987: Refactor _PyInterpreterFrame a bit, to assist generator …
Browse files Browse the repository at this point in the history
…improvement. (GH-100988)

Refactor _PyInterpreterFrame a bit, to assist generator improvement.
  • Loading branch information
markshannon committed Feb 13, 2023
1 parent 160f2fe commit d919917
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Include/internal/pycore_frame.h
Expand Up @@ -47,15 +47,13 @@ enum _frameowner {
};

typedef struct _PyInterpreterFrame {
/* "Specials" section */
PyCodeObject *f_code; /* Strong reference */
struct _PyInterpreterFrame *previous;
PyObject *f_funcobj; /* Strong reference. Only valid if not on C stack */
PyObject *f_globals; /* Borrowed reference. Only valid if not on C stack */
PyObject *f_builtins; /* Borrowed reference. Only valid if not on C stack */
PyObject *f_locals; /* Strong reference, may be NULL. Only valid if not on C stack */
PyCodeObject *f_code; /* Strong reference */
PyFrameObject *frame_obj; /* Strong reference, may be NULL. Only valid if not on C stack */
/* Linkage section */
struct _PyInterpreterFrame *previous;
// NOTE: This is not necessarily the last instruction started in the given
// frame. Rather, it is the code unit *prior to* the *next* instruction. For
// example, it may be an inline CACHE entry, an instruction we just jumped
Expand Down

0 comments on commit d919917

Please sign in to comment.