mirror of
https://github.com/python/cpython.git
synced 2025-11-01 02:38:53 +00:00
bpo-40941: Unify implicit and explicit state in the frame and generator objects into a single value. (GH-20803)
* Merge gen and frame state variables into one. * Replace stack pointer with depth in PyFrameObject. Makes code easier to read and saves a word of memory.
This commit is contained in:
parent
8e836bb21c
commit
cb9879b948
9 changed files with 155 additions and 95 deletions
|
|
@ -16,8 +16,6 @@ extern "C" {
|
|||
PyObject_HEAD \
|
||||
/* Note: gi_frame can be NULL if the generator is "finished" */ \
|
||||
PyFrameObject *prefix##_frame; \
|
||||
/* True if generator is being executed. */ \
|
||||
char prefix##_running; \
|
||||
/* The code object backing the generator */ \
|
||||
PyObject *prefix##_code; \
|
||||
/* List of weak reference. */ \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue