mirror of
https://github.com/python/cpython.git
synced 2026-07-25 19:32:01 -04:00
7dca47d7fa
The setters store these hooks while holding the module critical section
(via set_hook's Py_XSETREF), but the getters read and Py_NewRef the same
fields without it. Annotate both getters with @critical_section, matching
the other readline functions (gh-126895).
(cherry picked from commit 90b6a7992a)
Co-authored-by: Harjoth Khara <harjoth.khara@gmail.com>
Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>