mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-32030: Add _PyCoreConfig.argv (#4934)
* Add argc and argv to _PyCoreConfig * _PyMainInterpreterConfig_Read() now builds its argv from _PyCoreConfig.arg * Move _PyMain.env_warning_options into _Py_CommandLineDetails * Reorder pymain_free()
This commit is contained in:
parent
f4e21a2a72
commit
c4bca95106
3 changed files with 263 additions and 181 deletions
|
@ -47,10 +47,18 @@ typedef struct {
|
|||
wchar_t *home; /* PYTHONHOME environment variable,
|
||||
see also Py_SetPythonHome(). */
|
||||
wchar_t *program_name; /* Program name, see also Py_GetProgramName() */
|
||||
|
||||
int argc; /* Number of command line arguments,
|
||||
-1 means unset */
|
||||
wchar_t **argv; /* sys.argv, ignored if argc is negative */
|
||||
} _PyCoreConfig;
|
||||
|
||||
#define _PyCoreConfig_INIT \
|
||||
(_PyCoreConfig){.use_hash_seed = -1, .coerce_c_locale = -1, .utf8_mode = -1}
|
||||
(_PyCoreConfig){ \
|
||||
.use_hash_seed = -1, \
|
||||
.coerce_c_locale = -1, \
|
||||
.utf8_mode = -1, \
|
||||
.argc = -1}
|
||||
/* Note: _PyCoreConfig_INIT sets other fields to 0/NULL */
|
||||
|
||||
/* Placeholders while working on the new configuration API
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue