summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-03-01 12:10:14 (GMT)
committerGitHub <noreply@github.com>2019-03-01 12:10:14 (GMT)
commit62be763348d16ba90f96667aa0240503261393f0 (patch)
tree10067e60b25d4187d417fd8ea24deb3b90740a12 /Include
parentdfe884759d1f4441c889695f8985bc9feb9f37eb (diff)
downloadcpython-62be763348d16ba90f96667aa0240503261393f0.zip
cpython-62be763348d16ba90f96667aa0240503261393f0.tar.gz
cpython-62be763348d16ba90f96667aa0240503261393f0.tar.bz2
bpo-36142: Remove _PyMain structure (GH-12120)
* Move fields from _PyMain to _PyCoreConfig: * skip_first_line * run_command * run_module * run_filename * Replace _PyMain.stdin_is_interactive with a new stdin_is_interactive(config) function * Rename _PyMain to _PyArgv. Add "const _PyArgv *args" field to _PyCmdline.
Diffstat (limited to 'Include')
-rw-r--r--Include/cpython/coreconfig.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/Include/cpython/coreconfig.h b/Include/cpython/coreconfig.h
index 2ce99b2..4985bf3 100644
--- a/Include/cpython/coreconfig.h
+++ b/Include/cpython/coreconfig.h
@@ -276,7 +276,19 @@ typedef struct {
int legacy_windows_stdio;
#endif
- /* --- Private fields -------- */
+ /* --- Parameter only used by Py_Main() ---------- */
+
+ /* Skip the first line of the source ('run_filename' parameter), allowing use of non-Unix forms of
+ "#!cmd". This is intended for a DOS specific hack only.
+
+ Set by the -x command line option. */
+ int skip_source_first_line;
+
+ wchar_t *run_command; /* -c command line argument */
+ wchar_t *run_module; /* -m command line argument */
+ wchar_t *run_filename; /* Trailing command line argument without -c or -m */
+
+ /* --- Private fields ---------------------------- */
/* Install importlib? If set to 0, importlib is not initialized at all.
Needed by freeze_importlib. */