diff options
author | Brandt Bucher <brandtbucher@microsoft.com> | 2025-01-29 00:10:51 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-29 00:10:51 (GMT) |
commit | 828b27680f07f1ed8302616b8229f49c09032657 (patch) | |
tree | 234ff54d729e7233cca6a943800d1dadc20189d9 /Python/sysmodule.c | |
parent | 5c930a26fb78c40929f1b894efee1b07c6d828fd (diff) | |
download | cpython-828b27680f07f1ed8302616b8229f49c09032657.zip cpython-828b27680f07f1ed8302616b8229f49c09032657.tar.gz cpython-828b27680f07f1ed8302616b8229f49c09032657.tar.bz2 |
GH-126599: Remove the PyOptimizer API (GH-129194)
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r-- | Python/sysmodule.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 887591a..7e4cb45 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -2265,9 +2265,7 @@ sys_activate_stack_trampoline_impl(PyObject *module, const char *backend) { #ifdef PY_HAVE_PERF_TRAMPOLINE #ifdef _Py_JIT - _PyOptimizerObject* optimizer = _Py_GetOptimizer(); - if (optimizer != NULL) { - Py_DECREF(optimizer); + if (_PyInterpreterState_GET()->jit) { PyErr_SetString(PyExc_ValueError, "Cannot activate the perf trampoline if the JIT is active"); return NULL; } |