summaryrefslogtreecommitdiffstats
path: root/PC
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-11-23 09:43:14 (GMT)
committerGitHub <noreply@github.com>2017-11-23 09:43:14 (GMT)
commit1f15111a6e15d52f6b08907576ec61493cd59358 (patch)
treeb1a8fd55a1790e3dfd2026cc238e7344f293af90 /PC
parente32e79f7d8216b78ac9e61bb1f2eee693108d4ee (diff)
downloadcpython-1f15111a6e15d52f6b08907576ec61493cd59358.zip
cpython-1f15111a6e15d52f6b08907576ec61493cd59358.tar.gz
cpython-1f15111a6e15d52f6b08907576ec61493cd59358.tar.bz2
bpo-32030: Add _PyMainInterpreterConfig.pythonhome (#4513)
* Py_Main() now reads the PYTHONHOME environment variable * Add _Py_GetPythonHomeWithConfig() private function * Add _PyWarnings_InitWithConfig() * init_filters() doesn't get the current core configuration from the current interpreter or Python thread anymore. Pass explicitly the configuration to _PyWarnings_InitWithConfig(). * _Py_InitializeCore() now fails on _PyWarnings_InitWithConfig() failure. * Pass configuration as constant
Diffstat (limited to 'PC')
-rw-r--r--PC/getpathp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/PC/getpathp.c b/PC/getpathp.c
index 1d18fae..4756dc8 100644
--- a/PC/getpathp.c
+++ b/PC/getpathp.c
@@ -624,12 +624,12 @@ error:
static void
-calculate_path(_PyMainInterpreterConfig *config)
+calculate_path(const _PyMainInterpreterConfig *config)
{
wchar_t argv0_path[MAXPATHLEN+1];
wchar_t *buf;
size_t bufsz;
- wchar_t *pythonhome = Py_GetPythonHome();
+ wchar_t *pythonhome = _Py_GetPythonHomeWithConfig(config);
wchar_t *envpath = NULL;
int skiphome, skipdefault;
@@ -899,7 +899,7 @@ Py_SetPath(const wchar_t *path)
}
wchar_t *
-_Py_GetPathWithConfig(_PyMainInterpreterConfig *config)
+_Py_GetPathWithConfig(const _PyMainInterpreterConfig *config)
{
if (!module_search_path) {
calculate_path(config);