diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/main.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Modules/main.c b/Modules/main.c index 95076c6..203abf4 100644 --- a/Modules/main.c +++ b/Modules/main.c @@ -1396,6 +1396,16 @@ pymain_parse_envvars(_PyMain *pymain) if (pymain_init_tracemalloc(pymain) < 0) { return -1; } + if (pymain_get_xoption(pymain, L"dev")) { + /* "python3 -X dev ..." behaves + as "PYTHONMALLOC=debug python3 -Wd -X faulthandler ..." */ + core_config->allocator = "debug"; + if (pymain_optlist_append(pymain, &pymain->cmdline.warning_options, + L"default") < 0) { + return -1; + } + core_config->faulthandler = 1; + } return 0; } |