gh-112087: Remove duplicated critical_section (gh-114268)

This commit is contained in:
Donghee Na 2024-01-19 08:03:28 +09:00 committed by GitHub
parent 72abb8c5d4
commit d5442851a6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 6 deletions

View File

@ -816,13 +816,10 @@ static PyObject *
list_insert_impl(PyListObject *self, Py_ssize_t index, PyObject *object) list_insert_impl(PyListObject *self, Py_ssize_t index, PyObject *object)
/*[clinic end generated code: output=7f35e32f60c8cb78 input=b1987ca998a4ae2d]*/ /*[clinic end generated code: output=7f35e32f60c8cb78 input=b1987ca998a4ae2d]*/
{ {
PyObject *ret = Py_None; if (ins1(self, index, object) == 0) {
Py_BEGIN_CRITICAL_SECTION(self); Py_RETURN_NONE;
if (ins1(self, index, object) < 0) {
ret = NULL;
} }
Py_END_CRITICAL_SECTION(); return NULL;
return ret;
} }
/*[clinic input] /*[clinic input]