summaryrefslogtreecommitdiff
path: root/Include/internal/pycore_pathconfig.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/internal/pycore_pathconfig.h')
-rw-r--r--Include/internal/pycore_pathconfig.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/Include/internal/pycore_pathconfig.h b/Include/internal/pycore_pathconfig.h
index 61b3790fe1..b5d1144736 100644
--- a/Include/internal/pycore_pathconfig.h
+++ b/Include/internal/pycore_pathconfig.h
@@ -19,6 +19,7 @@ typedef struct _PyPathConfig {
wchar_t *program_name;
/* Set by Py_SetPythonHome() or PYTHONHOME environment variable */
wchar_t *home;
+#ifdef MS_WINDOWS
/* 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). */
@@ -26,12 +27,18 @@ typedef struct _PyPathConfig {
int site_import;
/* Set when a venv is detected */
wchar_t *base_executable;
+#endif
} _PyPathConfig;
-#define _PyPathConfig_INIT \
- {.module_search_path = NULL, \
- .isolated = -1, \
- .site_import = -1}
+#ifdef MS_WINDOWS
+# define _PyPathConfig_INIT \
+ {.module_search_path = NULL, \
+ .isolated = -1, \
+ .site_import = -1}
+#else
+# define _PyPathConfig_INIT \
+ {.module_search_path = NULL}
+#endif
/* Note: _PyPathConfig_INIT sets other fields to 0/NULL */
PyAPI_DATA(_PyPathConfig) _Py_path_config;