summaryrefslogtreecommitdiffstats
path: root/Programs/_testembed.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-08-01 00:13:04 (GMT)
committerGitHub <noreply@github.com>2018-08-01 00:13:04 (GMT)
commitb75d7e243512afcfb2285e6471262478383e09db (patch)
treea669ce23fbfe84ddbbb5b84ec0112df60ccf5f73 /Programs/_testembed.c
parent8ed317f1ca42a43df14282bbc3ccc0b5610432f4 (diff)
downloadcpython-b75d7e243512afcfb2285e6471262478383e09db.zip
cpython-b75d7e243512afcfb2285e6471262478383e09db.tar.gz
cpython-b75d7e243512afcfb2285e6471262478383e09db.tar.bz2
bpo-34170: Add _PyCoreConfig._frozen parameter (GH-8591)
Modify frozenmain.c to use _Py_InitializeFromConfig().
Diffstat (limited to 'Programs/_testembed.c')
-rw-r--r--Programs/_testembed.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Programs/_testembed.c b/Programs/_testembed.c
index f7e7749..94db29b 100644
--- a/Programs/_testembed.c
+++ b/Programs/_testembed.c
@@ -368,6 +368,7 @@ dump_config(void)
printf("_install_importlib = %i\n", config->_install_importlib);
printf("_check_hash_pycs_mode = %s\n", config->_check_hash_pycs_mode);
+ printf("_frozen = %i\n", config->_frozen);
#undef ASSERT_EQUAL
#undef ASSERT_STR_EQUAL
@@ -420,6 +421,8 @@ static int test_init_global_config(void)
putenv("PYTHONUNBUFFERED=");
Py_UnbufferedStdioFlag = 1;
+ Py_FrozenFlag = 1;
+
/* FIXME: test Py_LegacyWindowsFSEncodingFlag */
/* FIXME: test Py_LegacyWindowsStdioFlag */
@@ -525,6 +528,9 @@ static int test_init_from_config(void)
config._check_hash_pycs_mode = "always";
+ Py_FrozenFlag = 0;
+ config._frozen = 1;
+
_PyInitError err = _Py_InitializeFromConfig(&config);
/* Don't call _PyCoreConfig_Clear() since all strings are static */
if (_Py_INIT_FAILED(err)) {