◐ Shell
clean mode source ↗

Message 120677 - Python tracker

Thanks for the patch.  This looks fine, in principle.

A couple of comments and questions:

(1) I think the patch should provide *MIN values alongside the *MAX values (for signed types only, of course).

(2) Are we sure that these values are valid on all FreeBSD 4 platforms, or should these definitions be further restricted to Free BSD 4 / x86?

(3) Are the types of the constants definitely correct?  E.g., UINT64_MAX should have type uint64_t.  That gets a bit tricky, since we can't use casts (which would prevent these constants being used in preprocessor #ifs), so we need to determine exactly what basic types uint32_t and uint64_t match, and make sure to use the correct suffix (e.g., ULL, LL, UL, L).  For uint32_t I guess this is easy:  it'll almost certainly be the same type as unsigned int.  Is uint64_t defined as unsigned long long, or as unsigned long?