Use the correct character type in th_char.h depending on the language to use

RESOLVED FIXED in mozilla29

Status

()

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Ehsan, Assigned: Ehsan)

Tracking

Trunk
mozilla29
x86
Mac OS X
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [qa-])

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Created attachment 8358366 [details] [diff] [review]
Patch (v1)

+++ This bug was initially created as a clone of Bug #957356 +++

th_char.h is included in both C and C++ code.  We would like to restrict the char16_t type to C++ code only, and this is a place in our code base which we seem to be unintentionally using it in C code.

Since there is no good type which we can currently use for both C and C++, let's do this ugly hack of using uint16_t in C which is binary compatible.  The reason we cannot use wchar_t here is that in mingw, wchar_t is 4 bytes, which is not binary compatible with char16_t.
Attachment #8358366 - Flags: review?(smontagu)
Attachment #8358366 - Flags: review?(smontagu) → review+
https://hg.mozilla.org/mozilla-central/rev/2c474a82e2b0
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29

Updated

5 years ago
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.