Closed Bug 1018243 Opened 10 years ago Closed 10 years ago

Use unsigned char instead of char for latin1 strings

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla32

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(1 file)

Attached patch PatchSplinter Review
Initially I used char* but char can be signed which makes it more annoying and error-prone to use, especially when templatizing code to work on both jschar and char.

After talking to Luke we decided to add JS::Latin1Char, a typedef for unsigned char, and use that instead to avoid this footgun.
Attachment #8431602 - Flags: review?(luke)
Attachment #8431602 - Flags: review?(luke) → review+
https://hg.mozilla.org/mozilla-central/rev/f6406cfe3ab1
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: