-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Description
pycore_runtime.h is where the _PyRuntimeState struct is declared. Nearly every one of the structs it relies on ("sub-struct") is found in the internal header file that corresponds to that struct's subject matter, rather than in pycore_runtime.h. There are only a few that are declared in pycore_runtime.h, mostly because it was easier to put them there than create the appropriate header files.
In the interest of keeping the focus of pycore_runtime.h on _PyRuntimeState, I'd like to clear out the standalone sub-structs there.
The involves the following:
_Py_DebugOffsets- move to its own header file (pycore_debugger_utils.h)struct _getargs_runtime_state- inline in_PyRuntimeStatestruct _gilstate_runtime_state- inline in_PyRuntimeState_Py_AuditHookEntry- move to its own header file (pycore_audit.h); also move the other audit-related APIs to pycore_audit.h or audit.h (to be added)struct _reftracer_runtime_state- move to pycore_object_state.h
_Py_DebugOffsets is the most meaningful one to move since it is so big (visually occludes _PyRuntimeState). For _Py_AuditHookEntry, we probably should have added pycore_audit.h in the first place.