summaryrefslogtreecommitdiffstats
path: root/Modules/_xxinterpchannelsmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_xxinterpchannelsmodule.c')
-rw-r--r--Modules/_xxinterpchannelsmodule.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/Modules/_xxinterpchannelsmodule.c b/Modules/_xxinterpchannelsmodule.c
index bdffdba..1e41841 100644
--- a/Modules/_xxinterpchannelsmodule.c
+++ b/Modules/_xxinterpchannelsmodule.c
@@ -1,13 +1,8 @@
/* interpreters module */
/* low-level access to interpreter primitives */
-#ifndef Py_BUILD_CORE_BUILTIN
-# define Py_BUILD_CORE_MODULE 1
-#endif
-
#include "Python.h"
-#include "pycore_atexit.h" // _Py_AtExit()
-#include "pycore_interp_id.h" // _PyInterpreterState_GetIDObject()
+#include "interpreteridobject.h"
/*
@@ -2140,7 +2135,7 @@ channel_list_interpreters(PyObject *self, PyObject *args, PyObject *kwds)
goto except;
}
if (res) {
- id_obj = _PyInterpreterState_GetIDObject(interp);
+ id_obj = PyInterpreterState_GetIDObject(interp);
if (id_obj == NULL) {
goto except;
}
@@ -2407,7 +2402,7 @@ module_exec(PyObject *mod)
// Make sure chnnels drop objects owned by this interpreter
PyInterpreterState *interp = _get_current_interp();
- _Py_AtExit(interp, clear_interpreter, (void *)interp);
+ PyUnstable_AtExit(interp, clear_interpreter, (void *)interp);
return 0;