Skip to content
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

Use more appropriate types for base, precision and width #116

Open
eyalroz opened this issue Jul 31, 2021 · 4 comments
Open

Use more appropriate types for base, precision and width #116

eyalroz opened this issue Jul 31, 2021 · 4 comments

Comments

@eyalroz
Copy link

eyalroz commented Jul 31, 2021

The only base values the library support are: 2, 8, 10, 16. And yet - we pass it around in larger types, and not even the same type everywhere.

So, why should we not just use a single small type for the base? Say, uint_least8_t or uint_fast8_t?

@eyalroz
Copy link
Author

eyalroz commented Jul 31, 2021

@mickjc750 : This issue report is inspired by your commit b907595 , where you've done something similar. Which of the types do you believe is more appropriate?

@mickjc750
Copy link

mickjc750 commented Aug 1, 2021 via email

@eyalroz eyalroz changed the title Use a single, appropriate type for the base Use a single, appropriate type for base, precision and width Aug 1, 2021
@eyalroz eyalroz changed the title Use a single, appropriate type for base, precision and width Use a single, appropriate type for base Aug 1, 2021
@eyalroz eyalroz changed the title Use a single, appropriate type for base Use more appropriate types for base, precision and width Aug 1, 2021
@eyalroz
Copy link
Author

eyalroz commented Aug 1, 2021

@mickjc750 : You've packaged several issues into one... anyway, are we sure width always fits in a uint8_t ?

Also, please try to avoid commenting by replying to the email and quoting everything. If you reply, please quote nothing. Otherwise we get a huge quoted-part of your comment which doesn't add any new information.

@mickjc750
Copy link

mickjc750 commented Aug 1, 2021 via email

eyalroz added a commit to eyalroz/printf that referenced this issue Aug 1, 2021
… constants for numeric base variables; no functionality change.
eyalroz added a commit to eyalroz/printf that referenced this issue Aug 2, 2021
… constants for numeric base variables; no functionality change.
eyalroz added a commit to eyalroz/printf that referenced this issue Aug 3, 2021
… constants for numeric base variables; no functionality change.
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

No branches or pull requests

2 participants