mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
Clean up redundant ifdef in list getitem (#128257)
It's already inside a `Py_GIL_DISABLED` block so the `#else` clause is always unused.
This commit is contained in:
parent
8a26c7b2af
commit
42f7a00ae8
1 changed files with 0 additions and 4 deletions
|
@ -335,11 +335,7 @@ list_item_impl(PyListObject *self, Py_ssize_t idx)
|
||||||
if (!valid_index(idx, size)) {
|
if (!valid_index(idx, size)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
#ifdef Py_GIL_DISABLED
|
|
||||||
item = _Py_NewRefWithLock(self->ob_item[idx]);
|
item = _Py_NewRefWithLock(self->ob_item[idx]);
|
||||||
#else
|
|
||||||
item = Py_NewRef(self->ob_item[idx]);
|
|
||||||
#endif
|
|
||||||
exit:
|
exit:
|
||||||
Py_END_CRITICAL_SECTION();
|
Py_END_CRITICAL_SECTION();
|
||||||
return item;
|
return item;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue