mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-36763: Remove _PyCoreConfig.dll_path (GH-13402)
This commit is contained in:
parent
bab0db6076
commit
410759fba8
6 changed files with 15 additions and 41 deletions
|
@ -214,7 +214,8 @@ _PyCoreConfig_SetPathConfig(const _PyCoreConfig *core_config)
|
|||
goto no_memory;
|
||||
}
|
||||
#ifdef MS_WINDOWS
|
||||
if (copy_wstr(&path_config.dll_path, core_config->dll_path) < 0) {
|
||||
path_config.dll_path = _Py_GetDLLPath();
|
||||
if (path_config.dll_path == NULL) {
|
||||
goto no_memory;
|
||||
}
|
||||
#endif
|
||||
|
@ -322,14 +323,6 @@ _PyCoreConfig_CalculatePathConfig(_PyCoreConfig *config)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef MS_WINDOWS
|
||||
if (config->dll_path == NULL) {
|
||||
if (copy_wstr(&config->dll_path, path_config.dll_path) < 0) {
|
||||
goto no_memory;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (path_config.isolated != -1) {
|
||||
config->isolated = path_config.isolated;
|
||||
}
|
||||
|
@ -356,9 +349,6 @@ _PyCoreConfig_InitPathConfig(_PyCoreConfig *config)
|
|||
if (!config->use_module_search_paths
|
||||
|| (config->executable == NULL)
|
||||
|| (config->prefix == NULL)
|
||||
#ifdef MS_WINDOWS
|
||||
|| (config->dll_path == NULL)
|
||||
#endif
|
||||
|| (config->exec_prefix == NULL))
|
||||
{
|
||||
_PyInitError err = _PyCoreConfig_CalculatePathConfig(config);
|
||||
|
@ -435,7 +425,7 @@ Py_SetPath(const wchar_t *path)
|
|||
new_config.exec_prefix = _PyMem_RawWcsdup(L"");
|
||||
alloc_error |= (new_config.exec_prefix == NULL);
|
||||
#ifdef MS_WINDOWS
|
||||
new_config.dll_path = _PyMem_RawWcsdup(L"");
|
||||
new_config.dll_path = _Py_GetDLLPath();
|
||||
alloc_error |= (new_config.dll_path == NULL);
|
||||
#endif
|
||||
new_config.module_search_path = _PyMem_RawWcsdup(path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue