Closed Bug 733260 Opened 13 years ago Closed 13 years ago

Remove jsuint

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla13

People

(Reporter: dmandelin, Assigned: dmandelin)

References

Details

Attachments

(2 files)

I think this the last one (other than JSBool).
Attached patch PatchSplinter Review
Most |jsuint| is for array indexes and lengths, so I used uint32_t per the new APIs. I also followed that for string lengths. I used |unsigned| at a few places case-by-case where it seemed that was wanted.
Attachment #603135 - Flags: review?(luke)
Comment on attachment 603135 [details] [diff] [review] Patch It would be good to put something like this at the top of jsapi.h: /* Basic JSAPI type assumptions: */ JS_STATIC_ASSERT(sizeof(unsigned) >= 4); JS_STATIC_ASSERT(sizeof(int) >= 4); including any others that you can think of from the recent de-typedef-ification.
Attachment #603135 - Flags: review?(luke) → review+
(In reply to Luke Wagner [:luke] from comment #2) > Comment on attachment 603135 [details] [diff] [review] > Patch > > It would be good to put something like this at the top of jsapi.h: > > /* Basic JSAPI type assumptions: */ > JS_STATIC_ASSERT(sizeof(unsigned) >= 4); > JS_STATIC_ASSERT(sizeof(int) >= 4); Good idea. I'm pretty sure those two being less than 32 bits is the major breakage to worry about. Added to the landed patch. http://hg.mozilla.org/integration/mozilla-inbound/rev/ae005ec67376
Target Milestone: --- → mozilla13
(In reply to David Mandelin from comment #1) > Created attachment 603135 [details] [diff] [review] > Patch > > Most |jsuint| is for array indexes and lengths, so I used uint32_t per the > new APIs. I also followed that for string lengths. I used |unsigned| at a > few places case-by-case where it seemed that was wanted. You seem to have used |unsigned| everywhere.
(In reply to Ms2ger from comment #4) > (In reply to David Mandelin from comment #1) > > Created attachment 603135 [details] [diff] [review] > > Patch > > > > Most |jsuint| is for array indexes and lengths, so I used uint32_t per the > > new APIs. I also followed that for string lengths. I used |unsigned| at a > > few places case-by-case where it seemed that was wanted. > > You seem to have used |unsigned| everywhere. Thanks for catching! I brain-farted when writing my replace script. I'll post a followup that puts it how I wanted momentarily.
Attached patch Followup patchSplinter Review
Switches from unsigned to uint32_t all the places I originally intended.
Attachment #603501 - Flags: review?(luke)
Attachment #603501 - Flags: review?(luke) → review+
Thanks, that makes a lot more sense.
Depends on: 845021
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: