diff options
Diffstat (limited to 'Include')
-rw-r--r-- | Include/internal/pycore_context.h | 2 | ||||
-rw-r--r-- | Include/internal/pycore_gc.h | 2 | ||||
-rw-r--r-- | Include/internal/pycore_interp.h | 7 |
3 files changed, 9 insertions, 2 deletions
diff --git a/Include/internal/pycore_context.h b/Include/internal/pycore_context.h index f665ad5..ea4b3c8 100644 --- a/Include/internal/pycore_context.h +++ b/Include/internal/pycore_context.h @@ -37,6 +37,6 @@ struct _pycontexttokenobject { int _PyContext_Init(void); -void _PyContext_Fini(void); +void _PyContext_Fini(PyThreadState *tstate); #endif /* !Py_INTERNAL_CONTEXT_H */ diff --git a/Include/internal/pycore_gc.h b/Include/internal/pycore_gc.h index ad2e552..fd3fb7f 100644 --- a/Include/internal/pycore_gc.h +++ b/Include/internal/pycore_gc.h @@ -171,7 +171,7 @@ extern void _PyFloat_ClearFreeList(PyThreadState *tstate); extern void _PyList_ClearFreeList(PyThreadState *tstate); extern void _PyDict_ClearFreeList(void); extern void _PyAsyncGen_ClearFreeLists(PyThreadState *tstate); -extern void _PyContext_ClearFreeList(void); +extern void _PyContext_ClearFreeList(PyThreadState *tstate); #ifdef __cplusplus } diff --git a/Include/internal/pycore_interp.h b/Include/internal/pycore_interp.h index d624218..4f81102 100644 --- a/Include/internal/pycore_interp.h +++ b/Include/internal/pycore_interp.h @@ -124,6 +124,12 @@ struct _Py_async_gen_state { int asend_numfree; }; +struct _Py_context_state { + // List of free PyContext objects + PyContext *freelist; + int numfree; +}; + /* interpreter state */ @@ -223,6 +229,7 @@ struct _is { struct _Py_float_state float_state; struct _Py_frame_state frame; struct _Py_async_gen_state async_gen; + struct _Py_context_state context; /* Using a cache is very effective since typically only a single slice is created and then deleted again. */ |