summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
Diffstat (limited to 'Include')
-rw-r--r--Include/internal/pystate.h10
-rw-r--r--Include/pylifecycle.h10
2 files changed, 17 insertions, 3 deletions
diff --git a/Include/internal/pystate.h b/Include/internal/pystate.h
index 83fa7dc..6cee272 100644
--- a/Include/internal/pystate.h
+++ b/Include/internal/pystate.h
@@ -52,9 +52,17 @@ typedef struct _PyPathConfig {
wchar_t *program_name;
/* Set by Py_SetPythonHome() or PYTHONHOME environment variable */
wchar_t *home;
+ /* isolated and no_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 no_site_import;
} _PyPathConfig;
-#define _PyPathConfig_INIT {.module_search_path = NULL}
+#define _PyPathConfig_INIT \
+ {.module_search_path = NULL, \
+ .isolated = -1, \
+ .no_site_import = -1}
/* Note: _PyPathConfig_INIT sets other fields to 0/NULL */
PyAPI_DATA(_PyPathConfig) _Py_path_config;
diff --git a/Include/pylifecycle.h b/Include/pylifecycle.h
index 9644116..2fbc4f9 100644
--- a/Include/pylifecycle.h
+++ b/Include/pylifecycle.h
@@ -54,12 +54,18 @@ PyAPI_FUNC(int) Py_SetStandardStreamEncoding(const char *encoding,
PyAPI_FUNC(_PyInitError) _Py_InitializeCore(const _PyCoreConfig *);
PyAPI_FUNC(int) _Py_IsCoreInitialized(void);
-PyAPI_FUNC(_PyInitError) _PyCoreConfig_Read(_PyCoreConfig *);
+PyAPI_FUNC(_PyInitError) _PyCoreConfig_Read(
+ _PyCoreConfig *config,
+ int *isolated,
+ int *no_site_import);
PyAPI_FUNC(void) _PyCoreConfig_Clear(_PyCoreConfig *);
PyAPI_FUNC(int) _PyCoreConfig_Copy(
_PyCoreConfig *config,
const _PyCoreConfig *config2);
-PyAPI_FUNC(_PyInitError) _PyCoreConfig_InitPathConfig(_PyCoreConfig *config);
+PyAPI_FUNC(_PyInitError) _PyCoreConfig_InitPathConfig(
+ _PyCoreConfig *config,
+ int *isolated,
+ int *no_site_import);
PyAPI_FUNC(_PyInitError) _PyCoreConfig_SetPathConfig(
const _PyCoreConfig *config);