8000 Set enable_gil properly when PYTHON_GIL=1 · python/cpython@e0b8484 · GitHub
[go: up one dir, main page]

Skip to content

Commit e0b8484

Browse files
committed
Set enable_gil properly when PYTHON_GIL=1
1 parent a53ed2e commit e0b8484

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Python/initconfig.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1656,7 +1656,9 @@ config_read_env_vars(PyConfig *config)
16561656
#ifdef Py_GIL_DISABLED
16571657
if (strcmp(gil, "0") == 0) {
16581658
config->enable_gil = _PyConfig_GIL_DISABLE;
1659-
} else if (strcmp(gil, "1") != 0) {
1659+
} else if (strcmp(gil, "1") == 0) {
1660+
config->enable_gil = _PyConfig_GIL_ENABLE;
1661+
} else {
16601662
return _PyStatus_ERR("PYTHON_GIL must be \"0\" or \"1\"");
16611663
}
16621664
#else

0 commit comments

Comments
 (0)
0