bpo-34170: _PyCoreConfig_Read() defaults to argc=0 (GH-8595) · pythoncapi/cpython@ea68d83 · GitHub
Skip to content

Commit ea68d83

Browse files
authored
bpo-34170: _PyCoreConfig_Read() defaults to argc=0 (pythonGH-8595)
Add unit tests for argc and argv of _PyCoreConfig.
1 parent 9851227 commit ea68d83

3 files changed

Lines changed: 16 additions & 1 deletion

File tree

Lib/test/test_embed.py

Lines changed: 2 additions & 0 deletions

Modules/main.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2294,6 +2294,9 @@ _PyCoreConfig_Read(_PyCoreConfig *config)
22942294
if (config->_frozen < 0) {
22952295
config->_frozen = 0;
22962296
}
2297+
if (config->argc < 0) {
2298+
config->argc = 0;
2299+
}
22972300

22982301
return _Py_INIT_OK();
22992302
}

Programs/_testembed.c

Lines changed: 11 additions & 1 deletion

0 commit comments

Comments
 (0)