diff options
Diffstat (limited to 'Python/codecs.c')
-rw-r--r-- | Python/codecs.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Python/codecs.c b/Python/codecs.c index 66919856ce..32cc110d8e 100644 --- a/Python/codecs.c +++ b/Python/codecs.c @@ -33,7 +33,7 @@ static int _PyCodecRegistry_Init(void); /* Forward */ int PyCodec_Register(PyObject *search_function) { - PyInterpreterState *interp = _PyInterpreterState_GET_UNSAFE(); + PyInterpreterState *interp = _PyInterpreterState_GET(); if (interp->codec_search_path == NULL && _PyCodecRegistry_Init()) goto onError; if (search_function == NULL) { @@ -105,7 +105,7 @@ PyObject *_PyCodec_Lookup(const char *encoding) return NULL; } - PyInterpreterState *interp = _PyInterpreterState_GET_UNSAFE(); + PyInterpreterState *interp = _PyInterpreterState_GET(); if (interp->codec_search_path == NULL && _PyCodecRegistry_Init()) { return NULL; } @@ -188,7 +188,7 @@ int _PyCodec_Forget(const char *encoding) PyObject *v; int result; - PyInterpreterState *interp = _PyInterpreterState_GET_UNSAFE(); + PyInterpreterState *interp = _PyInterpreterState_GET(); if (interp->codec_search_path == NULL) { return -1; } @@ -621,7 +621,7 @@ PyObject *_PyCodec_DecodeText(PyObject *object, Return 0 on success, -1 on error */ int PyCodec_RegisterError(const char *name, PyObject *error) { - PyInterpreterState *interp = _PyInterpreterState_GET_UNSAFE(); + PyInterpreterState *interp = _PyInterpreterState_GET(); if (interp->codec_search_path == NULL && _PyCodecRegistry_Init()) return -1; if (!PyCallable_Check(error)) { @@ -639,7 +639,7 @@ PyObject *PyCodec_LookupError(const char *name) { PyObject *handler = NULL; - PyInterpreterState *interp = _PyInterpreterState_GET_UNSAFE(); + PyInterpreterState *interp = _PyInterpreterState_GET(); if (interp->codec_search_path == NULL && _PyCodecRegistry_Init()) return NULL; @@ -1491,7 +1491,7 @@ static int _PyCodecRegistry_Init(void) } }; - PyInterpreterState *interp = _PyInterpreterState_GET_UNSAFE(); + PyInterpreterState *interp = _PyInterpreterState_GET(); PyObject *mod; if (interp->codec_search_path != NULL) |