diff options
author | Donghee Na <donghee.na@python.org> | 2024-02-17 01:03:10 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-17 01:03:10 (GMT) |
commit | 8db8d7118e1ef22bc7cdc3d8b657bc10c22c2fd6 (patch) | |
tree | b8878610dcba4ff06f06737b60455160e8be2a87 /Include | |
parent | 318f2190bc93796008b0a4241243b0851b418436 (diff) | |
download | cpython-8db8d7118e1ef22bc7cdc3d8b657bc10c22c2fd6.zip cpython-8db8d7118e1ef22bc7cdc3d8b657bc10c22c2fd6.tar.gz cpython-8db8d7118e1ef22bc7cdc3d8b657bc10c22c2fd6.tar.bz2 |
gh-111968: Split _Py_async_gen_asend_freelist out of _Py_async_gen_fr… (gh-115546)
Diffstat (limited to 'Include')
-rw-r--r-- | Include/internal/pycore_freelist.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Include/internal/pycore_freelist.h b/Include/internal/pycore_freelist.h index 9900ce9..e684e08 100644 --- a/Include/internal/pycore_freelist.h +++ b/Include/internal/pycore_freelist.h @@ -105,11 +105,15 @@ struct _Py_async_gen_freelist { fragmentation, as _PyAsyncGenWrappedValue and PyAsyncGenASend are short-living objects that are instantiated for every __anext__() call. */ - struct _PyAsyncGenWrappedValue* value_freelist[_PyAsyncGen_MAXFREELIST]; - int value_numfree; + struct _PyAsyncGenWrappedValue* items[_PyAsyncGen_MAXFREELIST]; + int numfree; +#endif +}; - struct PyAsyncGenASend* asend_freelist[_PyAsyncGen_MAXFREELIST]; - int asend_numfree; +struct _Py_async_gen_asend_freelist { +#ifdef WITH_FREELISTS + struct PyAsyncGenASend* items[_PyAsyncGen_MAXFREELIST]; + int numfree; #endif }; @@ -129,6 +133,7 @@ struct _Py_object_freelists { struct _Py_slice_freelist slices; struct _Py_context_freelist contexts; struct _Py_async_gen_freelist async_gens; + struct _Py_async_gen_asend_freelist async_gen_asends; struct _Py_object_stack_freelist object_stacks; }; |