-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed
Closed
Copy link
Labels
3.14bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
The last field of PyInterpreterState
should be _initial_thread
and the last field of _PyRuntimeState
should be _main_interpreter
. Respectively, they are the preallocated struct values that are used for the "main" thread and main interpreter.
Having them at the end simplifies some backporting scenarios. It also gives better locality to all the state in the respective interpreter/runtime; otherwise any fields after _initial_thread
or _main_interpreter
will be separated from the rest by those structs.
I'll make sure there's a note on each struct and that any out-of-place fields are moved up.
Linked PRs
Metadata
Metadata
Assignees
Labels
3.14bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error