mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
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
This commit is contained in:
parent
e32e79f7d8
commit
1f15111a6e
8 changed files with 136 additions and 43 deletions
|
|
@ -12,6 +12,10 @@ PyAPI_FUNC(wchar_t *) Py_GetProgramName(void);
|
|||
|
||||
PyAPI_FUNC(void) Py_SetPythonHome(wchar_t *);
|
||||
PyAPI_FUNC(wchar_t *) Py_GetPythonHome(void);
|
||||
#ifdef Py_BUILD_CORE
|
||||
PyAPI_FUNC(wchar_t *) _Py_GetPythonHomeWithConfig(
|
||||
const _PyMainInterpreterConfig *config);
|
||||
#endif
|
||||
|
||||
#ifndef Py_LIMITED_API
|
||||
/* Only used by applications that embed the interpreter and need to
|
||||
|
|
@ -94,7 +98,8 @@ PyAPI_FUNC(wchar_t *) Py_GetPrefix(void);
|
|||
PyAPI_FUNC(wchar_t *) Py_GetExecPrefix(void);
|
||||
PyAPI_FUNC(wchar_t *) Py_GetPath(void);
|
||||
#ifdef Py_BUILD_CORE
|
||||
PyAPI_FUNC(wchar_t *) _Py_GetPathWithConfig(_PyMainInterpreterConfig *config);
|
||||
PyAPI_FUNC(wchar_t *) _Py_GetPathWithConfig(
|
||||
const _PyMainInterpreterConfig *config);
|
||||
#endif
|
||||
PyAPI_FUNC(void) Py_SetPath(const wchar_t *);
|
||||
#ifdef MS_WINDOWS
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue