From: Owain Davies <116417456+OTheDev@users.noreply.github.com> Date: Tue, 21 Feb 2023 10:03:50 +0000 (+0700) Subject: gh-101965: Fix usage of Py_EnterRecursiveCall return value in _bisectmodule.c (GH... X-Git-Tag: v3.12.0a6~111 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0f7a9725300e750947159409abbf5722a4a79f8b;p=thirdparty%2FPython%2Fcpython.git gh-101965: Fix usage of Py_EnterRecursiveCall return value in _bisectmodule.c (GH-101966) Closes #101965 Automerge-Triggered-By: GH:erlend-aasland --- diff --git a/Modules/_bisectmodule.c b/Modules/_bisectmodule.c index 9ceb3ae46fe5..d3bec535ee51 100644 --- a/Modules/_bisectmodule.c +++ b/Modules/_bisectmodule.c @@ -66,7 +66,7 @@ internal_bisect_right(PyObject *list, PyObject *item, Py_ssize_t lo, Py_ssize_t if (sq_item == NULL) { return -1; } - if (Py_EnterRecursiveCall("in _bisect.bisect_right") < 0) { + if (Py_EnterRecursiveCall("in _bisect.bisect_right")) { return -1; } PyTypeObject *tp = Py_TYPE(item); @@ -246,7 +246,7 @@ internal_bisect_left(PyObject *list, PyObject *item, Py_ssize_t lo, Py_ssize_t h if (sq_item == NULL) { return -1; } - if (Py_EnterRecursiveCall("in _bisect.bisect_left") < 0) { + if (Py_EnterRecursiveCall("in _bisect.bisect_left")) { return -1; } PyTypeObject *tp = Py_TYPE(item);