File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3917,26 +3917,9 @@ static PyObject *
39173917list_iteritem (PyObject * obj , Py_ssize_t * index )
39183918{
39193919 Py_ssize_t i = * index ;
3920- if (i >= PyList_GET_SIZE (obj )) {
3921- return NULL ;
3922- }
3923- #ifdef Py_GIL_DISABLED
3924- assert (_Py_IsOwnedByCurrentThread (obj ) ||
3925- _PyObject_GC_IS_SHARED (obj ));
3926- PyObject * result ;
3927- int race = _PyList_GetItemRefNoLock ((PyListObject * )obj , i , & result );
3928- if (race < 0 ) {
3929- // Slow path...
3930- result = list_get_item_ref ((PyListObject * )op , i );
3931- }
3920+ PyObject * result = list_get_item_ref ((PyListObject * )obj , i );
39323921 * index = i + 1 ;
39333922 return result ;
3934- #else
3935- PyObject * result = PyList_GET_ITEM (obj , i );
3936- Py_INCREF (result );
3937- * index = i + 1 ;
3938- return result ;
3939- #endif
39403923}
39413924
39423925static PyMappingMethods list_as_mapping = {
You can’t perform that action at this time.
0 commit comments