Skip to content

Commit 1b0b6f3

Browse files
Update Modules/_heapqmodule.c with Benedikts suggestion
Co-authored-by: Bénédikt Tran <[email protected]>
1 parent 167525d commit 1b0b6f3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Modules/_heapqmodule.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,8 +556,9 @@ _heapq_heappushpop_max_impl(PyObject *module, PyObject *heap, PyObject *item)
556556
Py_INCREF(top);
557557
cmp = PyObject_RichCompareBool(top, item, Py_LT);
558558
Py_DECREF(top);
559-
if (cmp < 0)
559+
if (cmp < 0) {
560560
return NULL;
561+
}
561562
if (cmp == 0) {
562563
return Py_NewRef(item);
563564
}

0 commit comments

Comments
 (0)