bpo-46841: Add a `_Py_SET_OPCODE` macro by brandtbucher · Pull Request #31780 · python/cpython
Conversation
Member
Now that we don't modify opargs anymore, this is a cleaner (and slighly more efficient) way of performing this common move.
brandtbucher
added
the
skip news
label
brandtbucher
requested a review
from markshannon
as a code owner
bedevere-bot
added
the
awaiting core review
label
the-knights-who-say-ni
added
the
CLA signed
label
brandtbucher
mentioned this pull request
26 tasks
sweeneyde
reviewed
Include/cpython/code.h Outdated
markshannon
requested changes
markshannon
left a comment
markshannon
left a comment
Member
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The C compiler is allowed to assume that for uint8_t *p1, _Py_CODEUNIT *p2, p1 and p2 don't alias. If you add the special char * cast, then it cannot make that (in this case false) assumption.
Include/cpython/code.h Outdated
bedevere-bot
added
awaiting changes
and removed
awaiting core review
labels
bedevere-bot
commented
Mar 9, 2022
bedevere-bot commented
When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.
markshannon
commented
Mar 9, 2022
markshannon commented
Member
LGTM, apart from the missing cast.
brandtbucher
merged commit
a89c29f
into
python:main
bedevere-bot
removed
the
awaiting changes
label
brandtbucher
mentioned this pull request
brandtbucher
deleted the
set-opcode
branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment