diff options
| author | Mark Shannon <mark@hotpy.org> | 2024-02-20 09:39:55 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-20 09:39:55 (GMT) |
| commit | 7b21403ccd16c480812a1e857c0ee2deca592be0 (patch) | |
| tree | ae54fc68fe298bea063502adff747e3ac1dd734d /Modules/_testinternalcapi.c | |
| parent | acda1757bc682922292215906459c2735ee99c04 (diff) | |
| download | cpython-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.c | 4 |
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; } |
