Mercurial > cpython-lru_cache-weakref
diff Python/codecs.c @ 31797:846b3ee7e106 legacy-trunk
Changed random calls to PyThreadState_Get() to use the macro
| author | Nicholas Bastin <nick.bastin@gmail.com> |
|---|---|
| date | Wed, 24 Mar 2004 22:22:12 +0000 |
| parents | 25519d6c97b8 |
| children | 201986d6d9d6 |
line wrap: on
line diff
--- a/Python/codecs.c Wed Mar 24 21:57:10 2004 +0000 +++ b/Python/codecs.c Wed Mar 24 22:22:12 2004 +0000 @@ -28,7 +28,7 @@ int PyCodec_Register(PyObject *search_function) { - PyInterpreterState *interp = PyThreadState_Get()->interp; + PyInterpreterState *interp = PyThreadState_GET()->interp; if (interp->codec_search_path == NULL && _PyCodecRegistry_Init()) goto onError; if (search_function == NULL) { @@ -103,7 +103,7 @@ goto onError; } - interp = PyThreadState_Get()->interp; + interp = PyThreadState_GET()->interp; if (interp->codec_search_path == NULL && _PyCodecRegistry_Init()) goto onError; @@ -395,7 +395,7 @@ Return 0 on success, -1 on error */ int PyCodec_RegisterError(const char *name, PyObject *error) { - PyInterpreterState *interp = PyThreadState_Get()->interp; + PyInterpreterState *interp = PyThreadState_GET()->interp; if (interp->codec_search_path == NULL && _PyCodecRegistry_Init()) return -1; if (!PyCallable_Check(error)) { @@ -413,7 +413,7 @@ { PyObject *handler = NULL; - PyInterpreterState *interp = PyThreadState_Get()->interp; + PyInterpreterState *interp = PyThreadState_GET()->interp; if (interp->codec_search_path == NULL && _PyCodecRegistry_Init()) return NULL; @@ -802,7 +802,7 @@ #endif }; - PyInterpreterState *interp = PyThreadState_Get()->interp; + PyInterpreterState *interp = PyThreadState_GET()->interp; PyObject *mod; int i;
