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.
This commit is contained in:
Victor Stinner 2019-03-01 13:10:14 +01:00 committed by GitHub
parent dfe884759d
commit 62be763348
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 145 additions and 145 deletions

View file

@ -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);