summaryrefslogtreecommitdiffstats
path: root/Include/internal/pycore_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/internal/pycore_context.h')
-rw-r--r--Include/internal/pycore_context.h20
1 files changed, 2 insertions, 18 deletions
diff --git a/Include/internal/pycore_context.h b/Include/internal/pycore_context.h
index ec884e9..3284efb 100644
--- a/Include/internal/pycore_context.h
+++ b/Include/internal/pycore_context.h
@@ -5,6 +5,7 @@
# error "this header requires Py_BUILD_CORE define"
#endif
+#include "pycore_freelist.h" // _PyFreeListState
#include "pycore_hamt.h" // PyHamtObject
@@ -13,7 +14,7 @@ extern PyTypeObject _PyContextTokenMissing_Type;
/* runtime lifecycle */
PyStatus _PyContext_Init(PyInterpreterState *);
-void _PyContext_Fini(PyInterpreterState *);
+void _PyContext_Fini(_PyFreeListState *);
/* other API */
@@ -22,23 +23,6 @@ typedef struct {
PyObject_HEAD
} _PyContextTokenMissing;
-#ifndef WITH_FREELISTS
-// without freelists
-# define PyContext_MAXFREELIST 0
-#endif
-
-#ifndef PyContext_MAXFREELIST
-# define PyContext_MAXFREELIST 255
-#endif
-
-struct _Py_context_state {
-#if PyContext_MAXFREELIST > 0
- // List of free PyContext objects
- PyContext *freelist;
- int numfree;
-#endif
-};
-
struct _pycontextobject {
PyObject_HEAD
PyContext *ctx_prev;