diff options
author | Victor Stinner <vstinner@python.org> | 2020-11-04 15:15:54 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-04 15:15:54 (GMT) |
commit | cfb41e80c1ac5940ec6f2246c9ab4a3d16ef757e (patch) | |
tree | 38ffc0a18b95111bc2c73b30f8dc741ba53f770e | |
parent | 8021875bbcf7385e651def51bc597472a569042c (diff) | |
download | cpython-cfb41e80c1ac5940ec6f2246c9ab4a3d16ef757e.zip cpython-cfb41e80c1ac5940ec6f2246c9ab4a3d16ef757e.tar.gz cpython-cfb41e80c1ac5940ec6f2246c9ab4a3d16ef757e.tar.bz2 |
bpo-42260: Reorganize PyConfig (GH-23149)
* Move orig_argv before argv
* Move program_name and platlibdir with other path configuration
inputs
Give a name to the PyPreConfig and PyConfig structures and separate
the type definitions.
-rw-r--r-- | Include/cpython/initconfig.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Include/cpython/initconfig.h b/Include/cpython/initconfig.h index 3a38f77..666c1e4 100644 --- a/Include/cpython/initconfig.h +++ b/Include/cpython/initconfig.h @@ -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? @@ -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; @@ -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; @@ -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; @@ -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; |