Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The function ``unsafe_object_compare()`` in :file:`Objects/listobject.c` has been optimized to avoid unnecessary reference count decrements on boolean results.
Patch by Benedikt Johannes.
2 changes: 1 addition & 1 deletion Objects/listobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -2774,8 +2774,8 @@ unsafe_object_compare(PyObject *v, PyObject *w, MergeState *ms)
}
else {
res = PyObject_IsTrue(res_obj);
Py_DECREF(res_obj);
}
Py_DECREF(res_obj);

/* Note that we can't assert
* res == PyObject_RichCompareBool(v, w, Py_LT);
Expand Down
Loading