diff options
Diffstat (limited to 'Include')
-rw-r--r-- | Include/internal/pycore_object.h | 2 | ||||
-rw-r--r-- | Include/internal/pycore_pymem.h | 2 | ||||
-rw-r--r-- | Include/internal/pycore_pystate.h | 7 |
3 files changed, 5 insertions, 6 deletions
diff --git a/Include/internal/pycore_object.h b/Include/internal/pycore_object.h index 46555218bc..ba6636d7f8 100644 --- a/Include/internal/pycore_object.h +++ b/Include/internal/pycore_object.h @@ -38,7 +38,7 @@ static inline void _PyObject_GC_TRACK_impl(const char *filename, int lineno, filename, lineno, "_PyObject_GC_TRACK"); PyThreadState *tstate = _PyThreadState_GET(); - PyGC_Head *generation0 = tstate->interp->runtime->gc.generation0; + PyGC_Head *generation0 = tstate->interp->gc.generation0; PyGC_Head *last = (PyGC_Head*)(generation0->_gc_prev); _PyGCHead_SET_NEXT(last, gc); _PyGCHead_SET_PREV(gc, last); diff --git a/Include/internal/pycore_pymem.h b/Include/internal/pycore_pymem.h index 97d8fd9990..a4e9720683 100644 --- a/Include/internal/pycore_pymem.h +++ b/Include/internal/pycore_pymem.h @@ -144,7 +144,7 @@ struct _gc_runtime_state { Py_ssize_t long_lived_pending; }; -PyAPI_FUNC(void) _PyGC_InitializeRuntime(struct _gc_runtime_state *); +PyAPI_FUNC(void) _PyGC_InitState(struct _gc_runtime_state *); /* Set the memory allocator of the specified domain to the default. diff --git a/Include/internal/pycore_pystate.h b/Include/internal/pycore_pystate.h index fec64a7bad..0c3c1e3df3 100644 --- a/Include/internal/pycore_pystate.h +++ b/Include/internal/pycore_pystate.h @@ -74,6 +74,8 @@ struct _is { int finalizing; + struct _gc_runtime_state gc; + PyObject *modules; PyObject *modules_by_index; PyObject *sysdict; @@ -130,9 +132,7 @@ struct _is { struct _warnings_runtime_state warnings; PyObject *audit_hooks; -/* - * See bpo-36876: miscellaneous ad hoc statics have been moved here. - */ + struct { struct { int level; @@ -239,7 +239,6 @@ typedef struct pyruntimestate { void (*exitfuncs[NEXITFUNCS])(void); int nexitfuncs; - struct _gc_runtime_state gc; struct _ceval_runtime_state ceval; struct _gilstate_runtime_state gilstate; |