]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-101965: Fix usage of Py_EnterRecursiveCall return value in _bisectmodule.c (GH...
authorOwain Davies <116417456+OTheDev@users.noreply.github.com>
Tue, 21 Feb 2023 10:03:50 +0000 (17:03 +0700)
committerGitHub <noreply@github.com>
Tue, 21 Feb 2023 10:03:50 +0000 (02:03 -0800)
Closes #101965

Automerge-Triggered-By: GH:erlend-aasland
Modules/_bisectmodule.c

index 9ceb3ae46fe56d3d8fc702c481f95b104944437c..d3bec535ee512d59c44cb5d4c7aad06d8f92603d 100644 (file)
@@ -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);