summaryrefslogtreecommitdiffstats
path: root/Include/cpython
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-03-01 15:25:19 (GMT)
committerGitHub <noreply@github.com>2019-03-01 15:25:19 (GMT)
commit95e2cbf32f8156c239b27dae558ba058d0f2d496 (patch)
tree5fb8df249cbb034a56d05d19c1e7511143aff6a6 /Include/cpython
parent625dbf2567533e6001d57e5969fba75c1b6ece43 (diff)
downloadcpython-95e2cbf32f8156c239b27dae558ba058d0f2d496.zip
cpython-95e2cbf32f8156c239b27dae558ba058d0f2d496.tar.gz
cpython-95e2cbf32f8156c239b27dae558ba058d0f2d496.tar.bz2
bpo-36142: Move command line parsing to coreconfig.c (GH-12123)
* Add _PyCoreConfig_ReadFromArgv() function which parses command line options: move code from main.c to coreconfig.c. * Add _PyCoreConfig_Write() to write the new configuration: coerce the LC_CTYPE locale, set Py_xxx global configuration variables, etc. * _PyCoreConfig_ReadFromArgv() now only changes the LC_CTYPE locale temporarily. _PyCoreConfig_Write() becomes responsible to set the LC_CTYPE locale. * Add _Py_SetArgcArgv() and _Py_ClearArgcArgv() functions * Rename many "pymain_xxx()" functions * Add "const" to some function parameters * Reorganize main.c to declare functions in the order in which they are called.
Diffstat (limited to 'Include/cpython')
-rw-r--r--Include/cpython/coreconfig.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/Include/cpython/coreconfig.h b/Include/cpython/coreconfig.h
index 4985bf3..8109d4a 100644
--- a/Include/cpython/coreconfig.h
+++ b/Include/cpython/coreconfig.h
@@ -5,6 +5,16 @@
extern "C" {
#endif
+/* _PyArgv */
+
+typedef struct {
+ int argc;
+ int use_bytes_argv;
+ char **bytes_argv;
+ wchar_t **wchar_argv;
+} _PyArgv;
+
+
/* _PyInitError */
typedef struct {