summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-12-15 01:05:29 (GMT)
committerGitHub <noreply@github.com>2017-12-15 01:05:29 (GMT)
commit41264f1cd4d6066b2797ff07cae465c1e06ff3b2 (patch)
tree79949fe2a6d0a5cbe6bc33851c6b8e86e8340e2d /Include
parentda273412c4374de07a500e7f23f89a6bb7527398 (diff)
downloadcpython-41264f1cd4d6066b2797ff07cae465c1e06ff3b2.zip
cpython-41264f1cd4d6066b2797ff07cae465c1e06ff3b2.tar.gz
cpython-41264f1cd4d6066b2797ff07cae465c1e06ff3b2.tar.bz2
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
Diffstat (limited to 'Include')
-rw-r--r--Include/pylifecycle.h2
-rw-r--r--Include/pystate.h15
2 files changed, 10 insertions, 7 deletions
diff --git a/Include/pylifecycle.h b/Include/pylifecycle.h
index 39339da..dcb7fcb 100644
--- a/Include/pylifecycle.h
+++ b/Include/pylifecycle.h
@@ -135,7 +135,7 @@ PyAPI_FUNC(const char *) _Py_gitversion(void);
#ifndef Py_LIMITED_API
PyAPI_FUNC(PyObject *) _PyBuiltin_Init(void);
PyAPI_FUNC(_PyInitError) _PySys_BeginInit(PyObject **sysmod);
-PyAPI_FUNC(int) _PySys_EndInit(PyObject *sysdict);
+PyAPI_FUNC(int) _PySys_EndInit(PyObject *sysdict, _PyMainInterpreterConfig *config);
PyAPI_FUNC(_PyInitError) _PyImport_Init(PyInterpreterState *interp);
PyAPI_FUNC(void) _PyExc_Init(PyObject * bltinmod);
PyAPI_FUNC(_PyInitError) _PyImportHooks_Init(void);
diff --git a/Include/pystate.h b/Include/pystate.h
index e8cf413..a56c9b4 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 \