Skip to content

Commit

Permalink
gh-112087: Remove duplicated critical_section (gh-114268)
Browse files Browse the repository at this point in the history
  • Loading branch information
corona10 authored Jan 18, 2024
1 parent 72abb8c commit d544285
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions Objects/listobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -816,13 +816,10 @@ static PyObject *
list_insert_impl(PyListObject *self, Py_ssize_t index, PyObject *object)
/*[clinic end generated code: output=7f35e32f60c8cb78 input=b1987ca998a4ae2d]*/
{
PyObject *ret = Py_None;
Py_BEGIN_CRITICAL_SECTION(self);
if (ins1(self, index, object) < 0) {
ret = NULL;
if (ins1(self, index, object) == 0) {
Py_RETURN_NONE;
}
Py_END_CRITICAL_SECTION();
return ret;
return NULL;
}

/*[clinic input]
Expand Down

0 comments on commit d544285

Please sign in to comment.