gh-100227: Move the dtoa State to PyInterpreterState (gh-102331)

https://github.com/python/cpython/issues/100227
This commit is contained in:
Eric Snow 2023-02-28 13:14:40 -07:00 committed by GitHub
parent b5ff382433
commit f300a1fa4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 39 additions and 17 deletions

View file

@ -53,7 +53,6 @@ extern "C" {
.gilstate = { \
.check_enabled = 1, \
}, \
.dtoa = _dtoa_runtime_state_INIT(runtime), \
.fileutils = { \
.force_ascii = -1, \
}, \
@ -94,10 +93,10 @@ extern "C" {
}, \
}, \
}, \
._main_interpreter = _PyInterpreterState_INIT, \
._main_interpreter = _PyInterpreterState_INIT(runtime._main_interpreter), \
}
#define _PyInterpreterState_INIT \
#define _PyInterpreterState_INIT(INTERP) \
{ \
.id_refcount = -1, \
.imports = IMPORTS_INIT, \
@ -113,6 +112,7 @@ extern "C" {
{ .threshold = 10, }, \
}, \
}, \
.dtoa = _dtoa_state_INIT(&(INTERP)), \
.static_objects = { \
.singletons = { \
._not_used = 1, \