Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-42260: Reorganize PyConfig #23149

Merged
merged 1 commit into from
Nov 4, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Include/cpython/initconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ PyAPI_FUNC(PyStatus) PyWideStringList_Insert(PyWideStringList *list,

/* --- PyPreConfig ----------------------------------------------- */

typedef struct {
typedef struct PyPreConfig {
int _config_init; /* _PyConfigInitEnum value */

/* Parse Py_PreInitializeFromBytesArgs() arguments?
Expand Down Expand Up @@ -128,7 +128,7 @@ PyAPI_FUNC(void) PyPreConfig_InitIsolatedConfig(PyPreConfig *config);
/* --- PyConfig ---------------------------------------------- */

/* This structure is best documented in the Doc/c-api/init_config.rst file. */
typedef struct {
typedef struct PyConfig {
int _config_init; /* _PyConfigInitEnum value */

int isolated;
Expand All @@ -147,8 +147,8 @@ typedef struct {
wchar_t *filesystem_errors;
wchar_t *pycache_prefix;
int parse_argv;
PyWideStringList orig_argv;
PyWideStringList argv;
wchar_t *program_name;
PyWideStringList xoptions;
PyWideStringList warnoptions;
int site_import;
Expand All @@ -169,12 +169,13 @@ typedef struct {
int legacy_windows_stdio;
#endif
wchar_t *check_hash_pycs_mode;
PyWideStringList orig_argv;

/* --- Path configuration inputs ------------ */
int pathconfig_warnings;
wchar_t *program_name;
wchar_t *pythonpath_env;
wchar_t *home;
wchar_t *platlibdir;

/* --- Path configuration outputs ----------- */
int module_search_paths_set;
Expand All @@ -185,7 +186,6 @@ typedef struct {
wchar_t *base_prefix;
wchar_t *exec_prefix;
wchar_t *base_exec_prefix;
wchar_t *platlibdir;

/* --- Parameter only used by Py_Main() ---------- */
int skip_source_first_line;
Expand Down