diff options
Diffstat (limited to 'Include/internal')
-rw-r--r-- | Include/internal/pycore_object.h | 7 | ||||
-rw-r--r-- | Include/internal/pycore_pylifecycle.h | 10 | ||||
-rw-r--r-- | Include/internal/pycore_pystate.h | 12 |
3 files changed, 12 insertions, 17 deletions
diff --git a/Include/internal/pycore_object.h b/Include/internal/pycore_object.h index 81548f8..1c5beb0 100644 --- a/Include/internal/pycore_object.h +++ b/Include/internal/pycore_object.h @@ -19,9 +19,10 @@ PyAPI_FUNC(int) _PyDict_CheckConsistency(PyObject *mp, int check_content); * NB: While the object is tracked by the collector, it must be safe to call the * ob_traverse method. * - * Internal note: _PyRuntime.gc.generation0->_gc_prev doesn't have any bit flags - * because it's not object header. So we don't use _PyGCHead_PREV() and - * _PyGCHead_SET_PREV() for it to avoid unnecessary bitwise operations. + * Internal note: _PyRuntimeState.gc.generation0->_gc_prev doesn't have + * any bit flags because it's not object header. So we don't use + * _PyGCHead_PREV() and _PyGCHead_SET_PREV() for it to avoid unnecessary + * bitwise operations. * * The PyObject_GC_Track() function is the public version of this macro. */ diff --git a/Include/internal/pycore_pylifecycle.h b/Include/internal/pycore_pylifecycle.h index 8a692ea..e303417 100644 --- a/Include/internal/pycore_pylifecycle.h +++ b/Include/internal/pycore_pylifecycle.h @@ -39,13 +39,10 @@ extern PyStatus _PyFaulthandler_Init(int enable); extern int _PyTraceMalloc_Init(int enable); extern PyObject * _PyBuiltin_Init(void); extern PyStatus _PySys_Create( - _PyRuntimeState *runtime, PyInterpreterState *interp, PyObject **sysmod_p); extern PyStatus _PySys_SetPreliminaryStderr(PyObject *sysdict); -extern int _PySys_InitMain( - _PyRuntimeState *runtime, - PyInterpreterState *interp); +extern int _PySys_InitMain(PyInterpreterState *interp); extern PyStatus _PyImport_Init(PyInterpreterState *interp); extern PyStatus _PyExc_Init(void); extern PyStatus _PyErr_Init(void); @@ -86,10 +83,7 @@ extern void _PyHash_Fini(void); extern int _PyTraceMalloc_Fini(void); extern void _PyWarnings_Fini(PyInterpreterState *interp); -extern void _PyGILState_Init( - _PyRuntimeState *runtime, - PyInterpreterState *interp, - PyThreadState *tstate); +extern void _PyGILState_Init(PyThreadState *tstate); extern void _PyGILState_Fini(_PyRuntimeState *runtime); PyAPI_FUNC(void) _PyGC_DumpShutdownStats(_PyRuntimeState *runtime); diff --git a/Include/internal/pycore_pystate.h b/Include/internal/pycore_pystate.h index 3ab4009..520a74b 100644 --- a/Include/internal/pycore_pystate.h +++ b/Include/internal/pycore_pystate.h @@ -19,6 +19,9 @@ extern "C" { #include "pycore_pymem.h" #include "pycore_warnings.h" +// forward +struct pyruntimestate; + /* ceval state */ @@ -68,6 +71,7 @@ struct _is { struct _is *next; struct _ts *tstate_head; + struct pyruntimestate *runtime; int64_t id; int64_t id_refcount; @@ -296,12 +300,8 @@ PyAPI_FUNC(void) _PyRuntime_Finalize(void); /* Other */ -PyAPI_FUNC(void) _PyThreadState_Init( - _PyRuntimeState *runtime, - PyThreadState *tstate); -PyAPI_FUNC(void) _PyThreadState_DeleteExcept( - _PyRuntimeState *runtime, - PyThreadState *tstate); +PyAPI_FUNC(void) _PyThreadState_Init(PyThreadState *tstate); +PyAPI_FUNC(void) _PyThreadState_DeleteExcept(PyThreadState *tstate); PyAPI_FUNC(PyThreadState *) _PyThreadState_Swap( struct _gilstate_runtime_state *gilstate, |