gh-96678: Avoid undefined behaviour in test (#96672)

This commit is contained in:
Matthias Görgens 2022-09-13 20:15:11 +08:00 committed by GitHub
parent 830a20eb32
commit 6ba686d97f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1581,7 +1581,7 @@ static int test_init_is_python_build(void)
config._is_python_build = INT_MAX;
env = getenv("NEGATIVE_ISPYTHONBUILD");
if (env && strcmp(env, "0") != 0) {
config._is_python_build++;
config._is_python_build = INT_MIN;
}
init_from_config_clear(&config);
Py_Finalize();