mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
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()
This commit is contained in:
parent
14d5331eb5
commit
da7933ecc3
19 changed files with 90 additions and 64 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue