mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-32030: Add _PyMainInterpreterConfig.executable (#4876)
* Add new fields to _PyMainInterpreterConfig: * executable * prefix * base_prefix * exec_prefix * base_exec_prefix * _PySys_EndInit() now sets sys attributes from _PyMainInterpreterConfig
This commit is contained in:
parent
da273412c4
commit
41264f1cd4
5 changed files with 92 additions and 69 deletions
|
@ -52,15 +52,18 @@ typedef struct {
|
|||
/* Placeholders while working on the new configuration API
|
||||
*
|
||||
* See PEP 432 for final anticipated contents
|
||||
*
|
||||
* For the moment, just handle the args to _Py_InitializeEx
|
||||
*/
|
||||
typedef struct {
|
||||
int install_signal_handlers;
|
||||
PyObject *argv; /* sys.argv list, can be NULL */
|
||||
PyObject *module_search_path; /* sys.path list */
|
||||
PyObject *warnoptions; /* sys.warnoptions list, can be NULL */
|
||||
PyObject *xoptions; /* sys._xoptions dict, can be NULL */
|
||||
PyObject *argv; /* sys.argv list, can be NULL */
|
||||
PyObject *executable; /* sys.executable str */
|
||||
PyObject *prefix; /* sys.prefix str */
|
||||
PyObject *base_prefix; /* sys.base_prefix str, can be NULL */
|
||||
PyObject *exec_prefix; /* sys.exec_prefix str */
|
||||
PyObject *base_exec_prefix; /* sys.base_exec_prefix str, can be NULL */
|
||||
PyObject *warnoptions; /* sys.warnoptions list, can be NULL */
|
||||
PyObject *xoptions; /* sys._xoptions dict, can be NULL */
|
||||
PyObject *module_search_path; /* sys.path list */
|
||||
} _PyMainInterpreterConfig;
|
||||
|
||||
#define _PyMainInterpreterConfig_INIT \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue