mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
gh-129643: Fix PyList_Insert
in free-threading builds (#129680)
This commit is contained in:
parent
779d06945c
commit
63f0406d5a
2 changed files with 3 additions and 2 deletions
|
@ -466,8 +466,8 @@ ins1(PyListObject *self, Py_ssize_t where, PyObject *v)
|
|||
where = n;
|
||||
items = self->ob_item;
|
||||
for (i = n; --i >= where; )
|
||||
items[i+1] = items[i];
|
||||
items[where] = Py_NewRef(v);
|
||||
FT_ATOMIC_STORE_PTR_RELAXED(items[i+1], items[i]);
|
||||
FT_ATOMIC_STORE_PTR_RELEASE(items[where], Py_NewRef(v));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue