summaryrefslogtreecommitdiffstats
path: root/Python/coreconfig.c
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 /Python/coreconfig.c
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 'Python/coreconfig.c')
-rw-r--r--Python/coreconfig.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Python/coreconfig.c b/Python/coreconfig.c
index 06dbada..d9b3013 100644
--- a/Python/coreconfig.c
+++ b/Python/coreconfig.c
@@ -424,6 +424,10 @@ _PyCoreConfig_Copy(_PyCoreConfig *config, const _PyCoreConfig *config2)
COPY_ATTR(legacy_windows_fs_encoding);
COPY_ATTR(legacy_windows_stdio);
#endif
+ COPY_ATTR(skip_source_first_line);
+ COPY_WSTR_ATTR(run_command);
+ COPY_WSTR_ATTR(run_module);
+ COPY_WSTR_ATTR(run_filename);
COPY_ATTR(_check_hash_pycs_mode);
COPY_ATTR(_frozen);
@@ -1559,6 +1563,10 @@ _PyCoreConfig_AsDict(const _PyCoreConfig *config)
SET_ITEM_INT(legacy_windows_fs_encoding);
SET_ITEM_INT(legacy_windows_stdio);
#endif
+ SET_ITEM_INT(skip_source_first_line);
+ SET_ITEM_WSTR(run_command);
+ SET_ITEM_WSTR(run_module);
+ SET_ITEM_WSTR(run_filename);
SET_ITEM_INT(_install_importlib);
SET_ITEM_STR(_check_hash_pycs_mode);
SET_ITEM_INT(_frozen);