Skip to content

Commit b2e56da

Browse files
committed
Handle error in PyObject_RichCompareBool
1 parent fa20556 commit b2e56da

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Objects/object.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,10 @@ _PyObject_FunctionStr(PyObject *x)
702702
goto done;
703703
}
704704
ret = PyObject_RichCompareBool(module, builtinsname, Py_NE);
705+
if (ret < 0) {
706+
// error
707+
goto done;
708+
}
705709
if (ret > 0) {
706710
result = PyUnicode_FromFormat("%S.%S()", module, qualname);
707711
goto done;

0 commit comments

Comments
 (0)