summaryrefslogtreecommitdiff
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-04-13 03:04:28 +0200
committerGitHub <noreply@github.com>2020-04-13 03:04:28 +0200
commitda7933ecc30e37b119756cb02b89a6ad99db22e0 (patch)
treee6c7227f2ded7b7354fb027342fa977f70808d10 /Python/pythonrun.c
parent14d5331eb5e6c38be12bad421bd59ad0fac9e448 (diff)
downloadcpython-git-da7933ecc30e37b119756cb02b89a6ad99db22e0.tar.gz
bpo-40268: Add _PyInterpreterState_GetConfig() (GH-19492)
Don't access PyInterpreterState.config member directly anymore, but use new functions: * _PyInterpreterState_GetConfig() * _PyInterpreterState_SetConfig() * _Py_GetConfig()
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index eb9159f1b5..522d152994 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -96,7 +96,7 @@ PyRun_InteractiveLoopFlags(FILE *fp, const char *filename_str, PyCompilerFlags *
PyCompilerFlags local_flags = _PyCompilerFlags_INIT;
int nomem_count = 0;
#ifdef Py_REF_DEBUG
- int show_ref_count = _PyInterpreterState_GET_UNSAFE()->config.show_ref_count;
+ int show_ref_count = _Py_GetConfig()->show_ref_count;
#endif
filename = PyUnicode_DecodeFSDefault(filename_str);
@@ -584,7 +584,7 @@ print_error_text(PyObject *f, int offset, PyObject *text_obj)
int
_Py_HandleSystemExit(int *exitcode_p)
{
- int inspect = _PyInterpreterState_GET_UNSAFE()->config.inspect;
+ int inspect = _Py_GetConfig()->inspect;
if (inspect) {
/* Don't exit if -i flag was given. This flag is set to 0
* when entering interactive mode for inspecting. */