diff options
author | Mark Shannon <mark@hotpy.org> | 2021-12-06 10:13:49 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-06 10:13:49 (GMT) |
commit | 299483c95d601ddcfdce2f96418b6499c1fc7b9f (patch) | |
tree | cb367a04d11b54d312305996bbc1039e1a47c929 /Lib | |
parent | f34d181fa15e1f082140a4e4a8fa3b77118f8e98 (diff) | |
download | cpython-299483c95d601ddcfdce2f96418b6499c1fc7b9f.zip cpython-299483c95d601ddcfdce2f96418b6499c1fc7b9f.tar.gz cpython-299483c95d601ddcfdce2f96418b6499c1fc7b9f.tar.bz2 |
bpo-45963: Make space for the InterpreterFrame of a generator in that generator. (GH-29891)
* Make generator, coroutine and async gen structs all the same size.
* Store interpreter frame in generator (and coroutine). Reduces the number of allocations neeeded for a generator from two to one.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_sys.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index 2b1ba24..8180289 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -1340,7 +1340,7 @@ class SizeofTest(unittest.TestCase): check(bar, size('PP')) # generator def get_gen(): yield 1 - check(get_gen(), size('P2PPP4P')) + check(get_gen(), size('P2PPP4P4c8P2iciP')) # iterator check(iter('abc'), size('lP')) # callable-iterator |