FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-101965: Fix usage of Py_EnterRecursiveCall return value in _bisectmodule.c by OTheDev · Pull Request #101966 · python/cpython · GitHub

/ cpython Public
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension .c  (2) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
Next Next commit
Fix incorrect usage of Py_EnterRecursiveCall() in main
  • Loading branch information
oda-gitso committed Feb 16, 2023
commit a01fd1ebf292163df64adcd10d71dfc4b3eed679
4 changes: 2 additions & 2 deletions Modules/_bisectmodule.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Comment thread
OTheDev marked this conversation as resolved.
return -1;
}
PyTypeObject *tp = Py_TYPE(item);
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion Python/pythonrun.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

Back | FazBrowse Home | New Git URL