Skip to content

gh-111386: Fix uint32_t cast in generated_cases.c.h #111387

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 3 commits into from
Oct 27, 2023

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Oct 27, 2023

Other places in this file just cast it:

» ag -Q 'frame->return_offset = (uint16_t)' Python/bytecodes.c
984:                frame->return_offset = (uint16_t)(1 + INLINE_CACHE_ENTRIES_SEND + oparg);
1023:            frame->return_offset = (uint16_t)(1 + INLINE_CACHE_ENTRIES_SEND + oparg);
2689:            frame->return_offset = (uint16_t)1 + INLINE_CACHE_ENTRIES_FOR_ITER + oparg;
3972:            frame->return_offset = (uint16_t)(next_instr - frame->instr_ptr);

Now, warning should be gone!

@iritkatriel iritkatriel merged commit 524a701 into python:main Oct 27, 2023
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
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.

2 participants