From a01fd1ebf292163df64adcd10d71dfc4b3eed679 Mon Sep 17 00:00:00 2001 From: oda-gitso Date: Fri, 17 Feb 2023 05:03:51 +0700 Subject: [PATCH] Fix incorrect usage of Py_EnterRecursiveCall() in main --- Modules/_bisectmodule.c | 4 ++-- Python/pythonrun.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Modules/_bisectmodule.c b/Modules/_bisectmodule.c index 9ceb3ae46fe56d..d3bec535ee512d 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); diff --git a/Python/pythonrun.c b/Python/pythonrun.c index ce993ea8796cb7..8378785c36f5e9 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -1247,7 +1247,7 @@ print_chained(struct exception_print_context* ctx, PyObject *value, { PyObject *f = ctx->file; - if (_Py_EnterRecursiveCall(" in print_chained") < 0) { + if (_Py_EnterRecursiveCall(" in print_chained")) { return -1; } bool need_close = ctx->need_close;