From 41264f1cd4d6066b2797ff07cae465c1e06ff3b2 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 15 Dec 2017 02:05:29 +0100 Subject: 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 --- Include/pystate.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'Include/pystate.h') diff --git a/Include/pystate.h b/Include/pystate.h index e8cf4134a8..a56c9b4ea6 100644 --- a/Include/pystate.h +++ b/Include/pystate.h @@ -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 \ -- cgit v1.2.1