Thanks to visit codestin.com
Credit goes to github.com

Skip to content

INTN_MAX macro constants are defined in <stdint.h> #116

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

Closed

Conversation

DimitriPapadopoulos
Copy link
Contributor

Hence they are C99, not C89!

Again, I don't see how we can possibly support 64-bit integers in pure C89.

@DimitriPapadopoulos
Copy link
Contributor Author

If json_int_t is known to be at least 64-bit, can we perhaps limit ourselves to the following?

#define JSON_INT_MAX 9223372036854775807

But then I'm not even sure such a large integer is valid in C89...

@LB--
Copy link
Member

LB-- commented Aug 14, 2021

I think the point of allowing the user to define json_int_t is that it could be defined smaller than 64 bits (or larger) depending on the user's needs. Perhaps we should merge #102 first.

@LB-- LB-- added this to the v1.1.1 milestone Aug 14, 2021
@DimitriPapadopoulos
Copy link
Contributor Author

Actually, it's best to let end users define JSON_INT_MAX themselves in a non-portable way if needed, just like json_int_t.

@LB--
Copy link
Member

LB-- commented Aug 14, 2021

That shouldn't be difficult to achieve. Though, with all this compile time customizability, I will want to add some way to detect mismatched compile settings as early as possible, worst case scenario being runtime asserts in debug builds.

@LB-- LB-- self-assigned this Aug 14, 2021
@DimitriPapadopoulos
Copy link
Contributor Author

See #115.

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