summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
Diffstat (limited to 'Objects')
-rw-r--r--Objects/moduleobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/moduleobject.c b/Objects/moduleobject.c
index 30de53d..c581951 100644
--- a/Objects/moduleobject.c
+++ b/Objects/moduleobject.c
@@ -174,7 +174,7 @@ _add_methods_to_object(PyObject *module, PyObject *name, PyMethodDef *functions)
PyObject *
PyModule_Create2(struct PyModuleDef* module, int module_api_version)
{
- if (!_PyImport_IsInitialized(_PyInterpreterState_Get())) {
+ if (!_PyImport_IsInitialized(_PyInterpreterState_GET_UNSAFE())) {
PyErr_SetString(PyExc_SystemError,
"Python import machinery not initialized");
return NULL;
@@ -699,7 +699,7 @@ module_dealloc(PyModuleObject *m)
static PyObject *
module_repr(PyModuleObject *m)
{
- PyInterpreterState *interp = _PyInterpreterState_Get();
+ PyInterpreterState *interp = _PyInterpreterState_GET_UNSAFE();
return PyObject_CallMethod(interp->importlib, "_module_repr", "O", m);
}