Skip to content

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

Merged
iritkatriel merged 3 commits intopython:mainfrom
sobolevn:issue-111386
Oct 27, 2023
Merged

gh-111386: Fix uint32_t cast in generated_cases.c.h#111387
iritkatriel merged 3 commits intopython:mainfrom
sobolevn:issue-111386

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!

Loading
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