summaryrefslogtreecommitdiffstats
path: root/Modules/_testinternalcapi.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 /Modules/_testinternalcapi.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 'Modules/_testinternalcapi.c')
-rw-r--r--Modules/_testinternalcapi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/_testinternalcapi.c b/Modules/_testinternalcapi.c
index 3834f00..bcc431a 100644
--- a/Modules/_testinternalcapi.c
+++ b/Modules/_testinternalcapi.c
@@ -977,7 +977,9 @@ set_optimizer(PyObject *self, PyObject *opt)
if (opt == Py_None) {
opt = NULL;
}
- PyUnstable_SetOptimizer((_PyOptimizerObject*)opt);
+ if (PyUnstable_SetOptimizer((_PyOptimizerObject*)opt) < 0) {
+ return NULL;
+ }
Py_RETURN_NONE;
}