summaryrefslogtreecommitdiffstats
path: root/Python/initconfig.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-04-13 01:04:28 (GMT)
committerGitHub <noreply@github.com>2020-04-13 01:04:28 (GMT)
commitda7933ecc30e37b119756cb02b89a6ad99db22e0 (patch)
treee6c7227f2ded7b7354fb027342fa977f70808d10 /Python/initconfig.c
parent14d5331eb5e6c38be12bad421bd59ad0fac9e448 (diff)
downloadcpython-da7933ecc30e37b119756cb02b89a6ad99db22e0.zip
cpython-da7933ecc30e37b119756cb02b89a6ad99db22e0.tar.gz
cpython-da7933ecc30e37b119756cb02b89a6ad99db22e0.tar.bz2
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/initconfig.c')
-rw-r--r--Python/initconfig.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/initconfig.c b/Python/initconfig.c
index 7bad36e..e63d6f6 100644
--- a/Python/initconfig.c
+++ b/Python/initconfig.c
@@ -2595,7 +2595,7 @@ _Py_GetConfigsAsDict(void)
Py_CLEAR(dict);
/* core config */
- const PyConfig *config = &tstate->interp->config;
+ const PyConfig *config = _PyInterpreterState_GetConfig(tstate->interp);
dict = config_as_dict(config);
if (dict == NULL) {
goto error;
@@ -2662,7 +2662,7 @@ _Py_DumpPathConfig(PyThreadState *tstate)
PySys_WriteStderr("\n"); \
} while (0)
- PyConfig *config = &tstate->interp->config;
+ const PyConfig *config = _PyInterpreterState_GetConfig(tstate->interp);
DUMP_CONFIG("PYTHONHOME", home);
DUMP_CONFIG("PYTHONPATH", pythonpath_env);
DUMP_CONFIG("program name", program_name);