Skip to content

Commit d919917

Browse files
authored
GH-100987: Refactor _PyInterpreterFrame a bit, to assist generator improvement. (GH-100988)
Refactor _PyInterpreterFrame a bit, to assist generator improvement.
1 parent 160f2fe commit d919917

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Include/internal/pycore_frame.h

+2-4
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,13 @@ enum _frameowner {
4747
};
4848

4949
typedef struct _PyInterpreterFrame {
50-
/* "Specials" section */
50+
PyCodeObject *f_code; /* Strong reference */
51+
struct _PyInterpreterFrame *previous;
5152
PyObject *f_funcobj; /* Strong reference. Only valid if not on C stack */
5253
PyObject *f_globals; /* Borrowed reference. Only valid if not on C stack */
5354
PyObject *f_builtins; /* Borrowed reference. Only valid if not on C stack */
5455
PyObject *f_locals; /* Strong reference, may be NULL. Only valid if not on C stack */
55-
PyCodeObject *f_code; /* Strong reference */
5656
PyFrameObject *frame_obj; /* Strong reference, may be NULL. Only valid if not on C stack */
57-
/* Linkage section */
58-
struct _PyInterpreterFrame *previous;
5957
// NOTE: This is not necessarily the last instruction started in the given
6058
// frame. Rather, it is the code unit *prior to* the *next* instruction. For
6159
// example, it may be an inline CACHE entry, an instruction we just jumped

0 commit comments

Comments
 (0)