You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 _PyRuntimeState
struct _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.
…125605)
This is essentially a cleanup, moving a handful of API declarations to the header files where they fit best, creating new ones when needed.
We do the following:
* add pycore_debug_offsets.h and move _Py_DebugOffsets, etc. there
* inline struct _getargs_runtime_state and struct _gilstate_runtime_state in _PyRuntimeState
* move struct _reftracer_runtime_state to the existing pycore_object_state.h
* add pycore_audit.h and move to it _Py_AuditHookEntry , _PySys_Audit(), and _PySys_ClearAuditHooks
* add audit.h and cpython/audit.h and move the existing audit-related API there
*move the perfmap/trampoline API from cpython/sysmodule.h to cpython/ceval.h, and remove the now-empty cpython/sysmodule.h
pythongh-125605)
This is essentially a cleanup, moving a handful of API declarations to the header files where they fit best, creating new ones when needed.
We do the following:
* add pycore_debug_offsets.h and move _Py_DebugOffsets, etc. there
* inline struct _getargs_runtime_state and struct _gilstate_runtime_state in _PyRuntimeState
* move struct _reftracer_runtime_state to the existing pycore_object_state.h
* add pycore_audit.h and move to it _Py_AuditHookEntry , _PySys_Audit(), and _PySys_ClearAuditHooks
* add audit.h and cpython/audit.h and move the existing audit-related API there
*move the perfmap/trampoline API from cpython/sysmodule.h to cpython/ceval.h, and remove the now-empty cpython/sysmodule.h
Uh oh!
There was an error while loading. Please reload this page.
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_PyRuntimeState
struct _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.Linked PRs
The text was updated successfully, but these errors were encountered: