[Python-checkins] gh-101965: Fix usage of Py_EnterRecursiveCall return value in _bisectmodule.c (GH-101966)

miss-islington webhook-mailer at python.org
Tue Feb 21 05:03:58 EST 2023


https://github.com/python/cpython/commit/0f7a9725300e750947159409abbf5722a4a79f8b
commit: 0f7a9725300e750947159409abbf5722a4a79f8b
branch: main
author: Owain Davies <116417456+OTheDev at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2023-02-21T02:03:50-08:00
summary:

gh-101965: Fix usage of Py_EnterRecursiveCall return value in _bisectmodule.c (GH-101966)



Closes #101965

Automerge-Triggered-By: GH:erlend-aasland

files:
M Modules/_bisectmodule.c

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);



More information about the Python-checkins mailing list