8000 gh-112087: Make PyList_{Append,Size,GetSlice} to be thread-safe by corona10 · Pull Request #114651 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-112087: Make PyList_{Append,Size,GetSlice} to be thread-safe #114651

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jan 31, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix compiler warn
  • Loading branch information
corona10 committed Jan 27, 2024
commit df1661d5cfadfb4c5164b55c0a10a6a5567b2ac7
3 changes: 1 addition & 2 deletions Objects/listobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ static PyObject *
list_slice(PyListObject *a, Py_ssize_t ilow, Py_ssize_t ihigh)
{
PyListObject *np;
PyObject **src, **dest;
PyObject **src;
Py_ssize_t i, len;
len = ihigh - ilow;
if (len <= 0) {
Expand All @@ -512,7 +512,6 @@ list_slice(PyListObject *a, Py_ssize_t ilow, Py_ssize_t ihigh)
return NULL;

src = a->ob_item + ilow;
dest = np->ob_item;
for (i = 0; i < len; i++) {
PyObject *v = src[i];
_Py_SET_ITEMREF(np, i, v);
Expand Down
0