gh-107954: Fix configuration type for the perf profiler (#124636)

This commit is contained in:
Pablo Galindo Salgado 2024-09-27 16:50:16 -07:00 committed by GitHub
parent 425587a110
commit 02b49c5150
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 28 additions and 15 deletions

View file

@ -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;