Skip to content

gh-158660: Simplify _list_extend_impl with macros - #163079

Open
encukou wants to merge 2 commits into
python:mainfrom
encukou:listobject-simplify
Open

encukou wants to merge 2 commits into
python:mainfrom
encukou:listobject-simplify

Conversation

@encukou

@encukou encukou commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

Move the if(lock_self) to common macros, to make it easier to avoid mistakes when adding new special cases later.

@vstinner, what do you think about this refactor?

FWIW, the CRITICAL_SECTION macros are part of the limited API now, so we can't change them easily; so reimplementing them should be fine.
The internal versions of PyCriticalSection_Begin & co. are fast static inline functions.

Move the `if(lock_self)` to common macros, to make it easier adding new
special cases easier.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant