-
Notifications
You must be signed in to change notification settings - Fork 268
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
Condition for calling read_number_raw #170
Labels
bug
Something isn't working
Comments
Thanks for your insight! |
My own view is that the documentation accords with intuition - that |
ibireme
added a commit
that referenced
this issue
Jun 30, 2024
Fixed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There must have been a reason for using
rather than simply
but I don't see it.
One, it doesn't seem to be in the spirit of yyjson to do two checks where one will do.
Two, the documentation for
YYJSON_READ_BIGNUM_AS_RAW
states "The flag will be overridden byYYJSON_READ_NUMBER_AS_RAW
flag." But with this code, it's the other way around, ifYYJSON_READ_BIGNUM_AS_RAW | YYJSON_READ_NUMBER_AS_RAW
is passed as flags, it'sYYJSON_READ_BIGNUM_AS_RAW
that overridesYYJSON_READ_NUMBER_AS_RAW
.It's a precondition that
pre
is not null before the call toread_number_raw
, but that's already guaranteed if either of the flags are set.All tests still pass with the alternative check.
The text was updated successfully, but these errors were encountered: