◐ Shell
reader mode source ↗
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
6 changes: 3 additions & 3 deletions Include/internal/pystate.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +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, \
.isolated = -1, \
.no_site_import = -1}
/* Note: _PyPathConfig_INIT sets other fields to 0/NULL */

PyAPI_DATA(_PyPathConfig) _Py_path_config;
Expand Down
32 changes: 28 additions & 4 deletions Include/pystate.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ typedef PyObject* (*_PyFrameEvalFunction)(struct _frame *, int);
typedef struct {
int install_signal_handlers; /* Install signal handlers? -1 means unset */

int ignore_environment; /* -E, Py_IgnoreEnvironmentFlag */
int use_hash_seed; /* PYTHONHASHSEED=x */
unsigned long hash_seed;
const char *allocator; /* Memory allocator: _PyMem_SetupAllocators() */
Expand Up @@ -75,18 +75,42 @@ typedef struct {
wchar_t *dll_path; /* Windows DLL path */
#endif

/* Private fields */
int _disable_importlib; /* Needed by freeze_importlib */
} _PyCoreConfig;

#define _PyCoreConfig_INIT \
(_PyCoreConfig){ \
.install_signal_handlers = -1, \
.use_hash_seed = -1, \
.coerce_c_locale = -1, \
.utf8_mode = -1, \
.argc = -1, \
.nmodule_search_path = -1}
/* Note: _PyCoreConfig_INIT sets other fields to 0/NULL */

/* Placeholders while working on the new configuration API
Expand Down
Loading
Toggle all file notes Toggle all file annotations