summaryrefslogtreecommitdiffstats
path: root/Python/pylifecycle.c
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2024-02-20 09:39:55 (GMT)
committerGitHub <noreply@github.com>2024-02-20 09:39:55 (GMT)
commit7b21403ccd16c480812a1e857c0ee2deca592be0 (patch)
treeae54fc68fe298bea063502adff747e3ac1dd734d /Python/pylifecycle.c
parentacda1757bc682922292215906459c2735ee99c04 (diff)
downloadcpython-7b21403ccd16c480812a1e857c0ee2deca592be0.zip
cpython-7b21403ccd16c480812a1e857c0ee2deca592be0.tar.gz
cpython-7b21403ccd16c480812a1e857c0ee2deca592be0.tar.bz2
GH-112354: Initial implementation of warm up on exits and trace-stitching (GH-114142)
Diffstat (limited to 'Python/pylifecycle.c')
-rw-r--r--Python/pylifecycle.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index b354c03..7b537af 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -1261,7 +1261,9 @@ init_interp_main(PyThreadState *tstate)
if (opt == NULL) {
return _PyStatus_ERR("can't initialize optimizer");
}
- PyUnstable_SetOptimizer((_PyOptimizerObject *)opt);
+ if (PyUnstable_SetOptimizer((_PyOptimizerObject *)opt)) {
+ return _PyStatus_ERR("can't initialize optimizer");
+ }
Py_DECREF(opt);
}
}