diff options
Diffstat (limited to 'Objects/moduleobject.c')
-rw-r--r-- | Objects/moduleobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/moduleobject.c b/Objects/moduleobject.c index acb920a..1f419ad 100644 --- a/Objects/moduleobject.c +++ b/Objects/moduleobject.c @@ -165,7 +165,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_UNSAFE())) { + if (!_PyImport_IsInitialized(_PyInterpreterState_GET())) { PyErr_SetString(PyExc_SystemError, "Python import machinery not initialized"); return NULL; @@ -684,7 +684,7 @@ module_dealloc(PyModuleObject *m) static PyObject * module_repr(PyModuleObject *m) { - PyInterpreterState *interp = _PyInterpreterState_GET_UNSAFE(); + PyInterpreterState *interp = _PyInterpreterState_GET(); return PyObject_CallMethod(interp->importlib, "_module_repr", "O", m); } |