-
Notifications
You must be signed in to change notification settings - Fork 214
tommath.h: do not expose limits.h #327
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
Conversation
|
Grepping through the debian code base shows that MP_WARRAY appears only in vendored tommath code, but never in library user code. |
|
I fully agree! However, this can be improved a little bit: See: So: cast the result of the sizeof() operator to (int). (I know, it already was like that, but if I propose to fix this in another PR then this one has to be rebased anyway) |
|
I think we also have mp_sizeof_bits. Unfortunately I am on mobile right now. If you have time, @nijtmans feel free to improve and push to this PR. I think you can push directly to this branch instead of opening another PR. |
|
@nijtmans I guess it is better now? |
nijtmans
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's exactly what I mean!
|
I'm not against this change itself, but as it would break our contracts with the user we should push it to a later stage and leave it as deprecated in tommath.h |
|
@sjaeckel Ok! Any plans on when you want to do the new release (1.2)? After that we could remove the deprecations and continue with 2.0? Would that be ok? |
1abe6c8 to
5c7947c
Compare
|
close in favor of #378 |
If we make
MP_WARRAYprivate we do not have to expose limits.h in the tommath.h header. I believeMP_WARRAYis never used by library consumers. We have deprecated it for now, after this change it would be only available intommath_private.h.