Closed Bug 504233 Opened 10 years ago Closed 10 years ago
_MAX, etc . #defines to jsinttypes .h
For greater styling as though we were using C99's definitions directly...
It's not strictly to spec as the comments in the changes note, but it's enough for us. No rush on review, just general incremental code hygiene improvement...
Attachment #388816 - Flags: review?(jim)
Comment on attachment 388816 [details] [diff] [review] Patch Could we have static asserts for the ptrdiff limits, too? I think jsnum.cpp is as good a place as any for the static asserts.
Comment on attachment 388816 [details] [diff] [review] Patch This looks great --- but I would like to have static asserts for the pointer-sized types, and I'd like to have all the limit definitions protected as they are in <stdint.h>, to give "jsstdint.h" as similar an interface to the standard as possible.
Attachment #388816 - Flags: review?(jim) → review-
On my system stdlib.h includes stdint.h, so the define has to be way way early. Given that, I gave up on just putting a universal define in jsprvtd.h; we'll have to suck it up and add it to files as needed.
We used to have a "jsstddef.h" include that by design had to come first (for some Windows 3.1 brain damage, I will drink if I have to remember it all -- had to do with ptrdiff_t being int16 and incapable of expressing distance between array elements on Win16!). Maybe we should bring it back. "jstypes.h" is first among the local includes but after standard header file includes alas. Just thinking about how you could get this macro "for free". /be
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.