mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
gh-107954: Fix configuration type for the perf profiler (#124636)
This commit is contained in:
parent
425587a110
commit
02b49c5150
5 changed files with 28 additions and 15 deletions
|
@ -810,6 +810,7 @@ static void set_most_env_vars(void)
|
|||
#ifdef Py_STATS
|
||||
putenv("PYTHONSTATS=1");
|
||||
#endif
|
||||
putenv("PYTHONPERFSUPPORT=1");
|
||||
}
|
||||
|
||||
|
||||
|
@ -1844,6 +1845,10 @@ static int test_initconfig_api(void)
|
|||
goto error;
|
||||
}
|
||||
|
||||
if (PyInitConfig_SetInt(config, "perf_profiling", 2) < 0) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
// Set a UTF-8 string (program_name)
|
||||
if (PyInitConfig_SetStr(config, "program_name", PROGRAM_NAME_UTF8) < 0) {
|
||||
goto error;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue