From c40c59fec154d19cd1ae479cf6d806c789503592 Mon Sep 17 00:00:00 2001 From: Donghee Na Date: Fri, 19 Jan 2024 07:33:12 +0900 Subject: [PATCH] gh-112087: Remove duplicated critical_section --- Objects/listobject.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Objects/listobject.c b/Objects/listobject.c index 79ef8f532fbb98..13511efe6af6f6 100644 --- a/Objects/listobject.c +++ b/Objects/listobject.c @@ -817,11 +817,9 @@ 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; + Py_RETURN_NONE } - Py_END_CRITICAL_SECTION(); return ret; }