summaryrefslogtreecommitdiffstats
path: root/Programs/_testembed.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-03-27 01:04:16 (GMT)
committerGitHub <noreply@github.com>2019-03-27 01:04:16 (GMT)
commit484f20d2ff95cc2e1bea759852da307bc1d1d944 (patch)
tree2f170dbbabfbff21d45d5c87d9bc0ecd73ba31ad /Programs/_testembed.c
parent8b9dbc017a190d13f717e714630d620adb7c7ac2 (diff)
downloadcpython-484f20d2ff95cc2e1bea759852da307bc1d1d944.zip
cpython-484f20d2ff95cc2e1bea759852da307bc1d1d944.tar.gz
cpython-484f20d2ff95cc2e1bea759852da307bc1d1d944.tar.bz2
bpo-36444: Add _PyCoreConfig._init_main (GH-12572)
* Add _PyCoreConfig._init_main: if equals to zero, _Py_InitializeFromConfig() doesn't call _Py_InitializeMainInterpreter(). * Add interp_p parameter to _Py_InitializeFromConfig(). * pymain_init() now calls _Py_InitializeFromConfig(). * Make _Py_InitializeCore() private.
Diffstat (limited to 'Programs/_testembed.c')
-rw-r--r--Programs/_testembed.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Programs/_testembed.c b/Programs/_testembed.c
index 76de8aa..7058799 100644
--- a/Programs/_testembed.c
+++ b/Programs/_testembed.c
@@ -529,7 +529,7 @@ static int test_init_from_config(void)
Py_FrozenFlag = 0;
config._frozen = 1;
- err = _Py_InitializeFromConfig(&config);
+ err = _Py_InitializeFromConfig(&config, NULL);
/* Don't call _PyCoreConfig_Clear() since all strings are static */
if (_Py_INIT_FAILED(err)) {
_Py_ExitInitError(err);
@@ -638,7 +638,7 @@ static int test_init_isolated(void)
config.program_name = L"./_testembed";
test_init_env_dev_mode_putenvs();
- err = _Py_InitializeFromConfig(&config);
+ err = _Py_InitializeFromConfig(&config, NULL);
if (_Py_INIT_FAILED(err)) {
_Py_ExitInitError(err);
}
@@ -669,7 +669,7 @@ static int test_preinit_isolated1(void)
config.program_name = L"./_testembed";
test_init_env_dev_mode_putenvs();
- err = _Py_InitializeFromConfig(&config);
+ err = _Py_InitializeFromConfig(&config, NULL);
if (_Py_INIT_FAILED(err)) {
_Py_ExitInitError(err);
}
@@ -706,7 +706,7 @@ static int test_preinit_isolated2(void)
config.program_name = L"./_testembed";
test_init_env_dev_mode_putenvs();
- err = _Py_InitializeFromConfig(&config);
+ err = _Py_InitializeFromConfig(&config, NULL);
if (_Py_INIT_FAILED(err)) {
_Py_ExitInitError(err);
}
@@ -723,7 +723,7 @@ static int test_init_dev_mode(void)
putenv("PYTHONMALLOC=");
config.dev_mode = 1;
config.program_name = L"./_testembed";
- _PyInitError err = _Py_InitializeFromConfig(&config);
+ _PyInitError err = _Py_InitializeFromConfig(&config, NULL);
if (_Py_INIT_FAILED(err)) {
_Py_ExitInitError(err);
}