summaryrefslogtreecommitdiffstats
path: root/Python/codecs.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-07-02 16:37:37 (GMT)
committerGitHub <noreply@github.com>2023-07-02 16:37:37 (GMT)
commitbc7eb1708452da59c22782c487ae7f05f1788970 (patch)
tree9bed06f1ec6084183251579badf9d32ad332d866 /Python/codecs.c
parent9a51a419619bb9dd1075d683708c57803c5d48c7 (diff)
downloadcpython-bc7eb1708452da59c22782c487ae7f05f1788970.zip
cpython-bc7eb1708452da59c22782c487ae7f05f1788970.tar.gz
cpython-bc7eb1708452da59c22782c487ae7f05f1788970.tar.bz2
gh-106320: Use _PyInterpreterState_GET() (#106336)
Replace PyInterpreterState_Get() with inlined _PyInterpreterState_GET().
Diffstat (limited to 'Python/codecs.c')
-rw-r--r--Python/codecs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/codecs.c b/Python/codecs.c
index 1983f56..f9f2300 100644
--- a/Python/codecs.c
+++ b/Python/codecs.c
@@ -11,7 +11,7 @@ Copyright (c) Corporation for National Research Initiatives.
#include "Python.h"
#include "pycore_call.h" // _PyObject_CallNoArgs()
#include "pycore_interp.h" // PyInterpreterState.codec_search_path
-#include "pycore_pyerrors.h" // _PyErr_FormatNote()
+#include "pycore_pyerrors.h" // _PyErr_FormatNote()
#include "pycore_pystate.h" // _PyInterpreterState_GET()
#include "pycore_ucnhash.h" // _PyUnicode_Name_CAPI
#include <ctype.h>
@@ -55,7 +55,7 @@ int PyCodec_Register(PyObject *search_function)
int
PyCodec_Unregister(PyObject *search_function)
{
- PyInterpreterState *interp = PyInterpreterState_Get();
+ PyInterpreterState *interp = _PyInterpreterState_GET();
PyObject *codec_search_path = interp->codec_search_path;
/* Do nothing if codec_search_path is not created yet or was cleared. */
if (codec_search_path == NULL) {