mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
bpo-42260: Add _PyConfig_FromDict() (GH-23167)
* Rename config_as_dict() to _PyConfig_AsDict(). * Add 'module_search_paths_set' to _PyConfig_AsDict(). * Add _PyConfig_FromDict(). * Add get_config() and set_config() to _testinternalcapi. * Add config_check_consistency().
This commit is contained in:
parent
4662fa9bfe
commit
f3cb814315
6 changed files with 653 additions and 60 deletions
|
@ -2922,7 +2922,9 @@ _PySys_UpdateConfig(PyThreadState *tstate)
|
|||
#define SET_SYS_FROM_WSTR(KEY, VALUE) \
|
||||
SET_SYS(KEY, PyUnicode_FromWideChar(VALUE, -1));
|
||||
|
||||
COPY_LIST("path", config->module_search_paths);
|
||||
if (config->module_search_paths_set) {
|
||||
COPY_LIST("path", config->module_search_paths);
|
||||
}
|
||||
|
||||
SET_SYS_FROM_WSTR("executable", config->executable);
|
||||
SET_SYS_FROM_WSTR("_base_executable", config->base_executable);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue