Skip to content

Conversation

@he32
Copy link

@he32 he32 commented Dec 21, 2018

In other words, it must either be EOF or a value representable by an
unsigned char. Here we simply cast all the arguments to these functions
to "unsigned char".

In other words, it must either be EOF or a value representable by an
unsigned char.  Here we simply cast all the arguments to these functions
to "unsigned char".
@tobez
Copy link
Contributor

tobez commented Aug 9, 2023

Would not it be better to use actual unsigned chars in many, if not all, instances, instead of blindly doing the conversion for every use of isXXXX() ?

@he32
Copy link
Author

he32 commented Sep 29, 2023

Would not it be better to use actual unsigned chars in many, if not all, instances, instead of blindly doing the conversion for every use of isXXXX() ?

Possibly. However, EOF cannot be represented in an unsigned char, so if you need to test for EOF that needs to be done before the returned data is passed on. I've not looked at whether that would make the diff smaller or the code simpler.

@tobez tobez self-assigned this Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants