summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2021-10-14 20:48:32 (GMT)
committerGitHub <noreply@github.com>2021-10-14 20:48:32 (GMT)
commit0bbea0723ee07f9d7ad9745f0e1875718ef38715 (patch)
tree0bbf9521b1a68f11d7696ac57da990f220c37414 /Python
parent3cc56c828d2d8f8659ea49447234bf0d2b87cd64 (diff)
downloadcpython-0bbea0723ee07f9d7ad9745f0e1875718ef38715.zip
cpython-0bbea0723ee07f9d7ad9745f0e1875718ef38715.tar.gz
cpython-0bbea0723ee07f9d7ad9745f0e1875718ef38715.tar.bz2
bpo-45471: Do not set PyConfig.stdlib_dir in Py_SetPythonHome(). (gh-28954)
The change in gh-28586 (bpo-45211) should not have included code to set _Py_path_config.stdlib_dir in Py_SetPythonHome(). We fix that here. https://bugs.python.org/issue45471
Diffstat (limited to 'Python')
-rw-r--r--Python/pathconfig.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/Python/pathconfig.c b/Python/pathconfig.c
index 2ebb9d3..ad22222 100644
--- a/Python/pathconfig.c
+++ b/Python/pathconfig.c
@@ -530,13 +530,10 @@ Py_SetPythonHome(const wchar_t *home)
PyMem_RawFree(_Py_path_config.home);
_Py_path_config.home = _PyMem_RawWcsdup(home);
- if (_Py_path_config.home != NULL) {
- _Py_path_config.stdlib_dir = _PyMem_RawWcsdup(home);
- }
PyMem_SetAllocator(PYMEM_DOMAIN_RAW, &old_alloc);
- if (_Py_path_config.home == NULL || _Py_path_config.stdlib_dir == NULL) {
+ if (_Py_path_config.home == NULL) {
path_out_of_memory(__func__);
}
}