Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion Include/cpython/coreconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
5 changes: 5 additions & 0 deletions Lib/test/test_embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,11 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
'stdio_encoding': GET_DEFAULT_CONFIG,
'stdio_errors': GET_DEFAULT_CONFIG,

'skip_source_first_line': 0,
'run_command': None,
'run_module': None,
'run_filename': None,

'_install_importlib': 1,
'_check_hash_pycs_mode': 'default',
'_frozen': 0,
Expand Down
Loading