diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-12-19 22:48:17 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-19 22:48:17 (GMT) |
commit | c4bca951065f4b2b6833f6ce7a0721e863e2343e (patch) | |
tree | 81105844562d19d84e13c051c6a73c7c133ffeb7 /Include/pystate.h | |
parent | f4e21a2a72f76d75a6cc6f74faf910a5f3108482 (diff) | |
download | cpython-c4bca951065f4b2b6833f6ce7a0721e863e2343e.zip cpython-c4bca951065f4b2b6833f6ce7a0721e863e2343e.tar.gz cpython-c4bca951065f4b2b6833f6ce7a0721e863e2343e.tar.bz2 |
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()
Diffstat (limited to 'Include/pystate.h')
-rw-r--r-- | Include/pystate.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Include/pystate.h b/Include/pystate.h index fff134a..ed5b6c9 100644 --- a/Include/pystate.h +++ b/Include/pystate.h @@ -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 |