gh-112062: Make `_struct` module thread-safe in `--disable-gil` builds by chgnrdv · Pull Request #112094 · python/cpython

@chgnrdv

* use `PyDict_GetItemRef` instead of `PyDict_GetItemWithError` in `cache_struct_converter` to avoid usage of borrowed ref with explicit incref
* clear cache dict but preserve the reference in `_clearcache_impl`
* create cache dict in `_structmodule_exec`

@chgnrdv

colesbury

kumaraditya303

aisk pushed a commit to aisk/cpython that referenced this pull request

Feb 11, 2024

Glyphack pushed a commit to Glyphack/cpython that referenced this pull request

Sep 2, 2024