Skip to content

Conversation

@ndossche
Copy link
Member

@ndossche ndossche commented Nov 8, 2025

If we use signed integers (which fit the unsigned chars), then we can avoid the extra checks. Also move an exception check to the proper place.

If we use signed integers (which fit the unsigned chars), then we can
avoid the extra checks. Also move an exception check to the proper
place.
Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These conditions trace back to 30c0557#diff-9c1967d7282ea72ecea9d5dae0dab7349a34d48cc7a10ca38ff49a616f628e40, was mainly wondering if I had touched this or not during the refactoring I did of range() or not. And it seems I didn't.

This change makes a lot of sense to me, but maybe just add a comment above the definition of low and high to explain why we assign to int and not unsigned char?

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