diff options
Diffstat (limited to 'Include/internal/pycore_state.h')
-rw-r--r-- | Include/internal/pycore_state.h | 49 |
1 files changed, 2 insertions, 47 deletions
diff --git a/Include/internal/pycore_state.h b/Include/internal/pycore_state.h index 9a084f7..6285ecf 100644 --- a/Include/internal/pycore_state.h +++ b/Include/internal/pycore_state.h @@ -11,8 +11,9 @@ extern "C" { #include "pystate.h" #include "pythread.h" -#include "pycore_mem.h" #include "pycore_ceval.h" +#include "pycore_mem.h" +#include "pycore_pathconfig.h" #include "pycore_warnings.h" @@ -40,52 +41,6 @@ struct _gilstate_runtime_state { #define _PyGILState_check_enabled _PyRuntime.gilstate.check_enabled -typedef struct _PyPathConfig { - /* Full path to the Python program */ - wchar_t *program_full_path; - wchar_t *prefix; -#ifdef MS_WINDOWS - wchar_t *dll_path; -#else - wchar_t *exec_prefix; -#endif - /* Set by Py_SetPath(), or computed by _PyPathConfig_Init() */ - wchar_t *module_search_path; - /* Python program name */ - wchar_t *program_name; - /* Set by Py_SetPythonHome() or PYTHONHOME environment variable */ - wchar_t *home; - /* isolated and site_import are used to set Py_IsolatedFlag and - Py_NoSiteFlag flags on Windows in read_pth_file(). These fields - are ignored when their value are equal to -1 (unset). */ - int isolated; - int site_import; -} _PyPathConfig; - -#define _PyPathConfig_INIT \ - {.module_search_path = NULL, \ - .isolated = -1, \ - .site_import = -1} -/* Note: _PyPathConfig_INIT sets other fields to 0/NULL */ - -PyAPI_DATA(_PyPathConfig) _Py_path_config; - -PyAPI_FUNC(_PyInitError) _PyPathConfig_Calculate_impl( - _PyPathConfig *config, - const _PyCoreConfig *core_config); -PyAPI_FUNC(void) _PyPathConfig_ClearGlobal(void); - -PyAPI_FUNC(void) _Py_wstrlist_clear( - int len, - wchar_t **list); -PyAPI_FUNC(wchar_t**) _Py_wstrlist_copy( - int len, - wchar_t **list); -PyAPI_FUNC(_PyInitError) _Py_wstrlist_append( - int *len, - wchar_t ***list, - const wchar_t *str); - /* interpreter state */ PyAPI_FUNC(PyInterpreterState *) _PyInterpreterState_LookUpID(PY_INT64_T); |