Skip to content

Commit 20dd756

Browse files
committed
fixup! fixup! Fail if an invalid X-option is provided in the command line
1 parent 33bf9dc commit 20dd756

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Python/initconfig.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2121,6 +2121,10 @@ _PyConfig_InitImportConfig(PyConfig *config)
21212121
return config_init_import(config, 1);
21222122
}
21232123

2124+
// List of known xoptions to validate against the provided ones. Note that all
2125+
// options are listed, even if they are only available if a specific macro is
2126+
// set, like -X showrefcount which requires a debug build. In this case unknown
2127+
// options are silently ignored.
21242128
const wchar_t* known_xoptions[] = {
21252129
L"faulthandler",
21262130
L"showrefcount",

0 commit comments

Comments
 (0)