Skip to content

Commit 20d51dc

Browse files
committed
Update _sysconfig.c
1 parent f4f1748 commit 20d51dc

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

Modules/_sysconfig.c

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,23 @@ _sysconfig_config_vars_impl(PyObject *module)
6666
Py_DECREF(config);
6767
return NULL;
6868
}
69-
69+
#ifdef Py_JIT_ENABLED
70+
if (Py_JIT_ENABLED == 1) {
71+
PyObject *py_jit_enabled = _PyLong_GetOne();
72+
} else {
73+
PyObject *py_jit_enabled = PyUnicode_FromString("interpreter");
74+
if (py_jit_enabled == NULL) {
75+
Py_DECREF(config);
76+
return NULL;
77+
}
78+
}
79+
#else
80+
PyObject *py_jit_enabled = _PyLong_GetZero();
81+
#endif
82+
if (PyDict_SetItemString(config, "Py_JIT_ENABLED", py_jit_enabled) < 0) {
83+
Py_DECREF(config);
84+
return NULL;
85+
}
7086
return config;
7187
}
7288

0 commit comments

Comments
 (0)