mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +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)) {
|
||||
goto exit;
|
||||
}
|
||||
#ifdef Py_GIL_DISABLED
|
||||
item = _Py_NewRefWithLock(self->ob_item[idx]);
|
||||
#else
|
||||
item = Py_NewRef(self->ob_item[idx]);
|
||||
#endif
|
||||
exit:
|
||||
Py_END_CRITICAL_SECTION();
|
||||
return item;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue