Closed Bug 1100997 Opened 5 years ago Closed 5 years ago
Utils Win .h compilation on mingw .
On GCC char16_t is not the same as wchar_t, so we need a cast.
Attachment #8524657 - Flags: review?(nfroyd)
Attachment #8524657 - Flags: review?(nfroyd) → review+
Thinking about this a little more, we have a raft of 16-bit character methods on nsString...are none of them applicable here?
Sadly no. We use char16_t for internal UTF16 representation, while Windows API uses wchar_t for that. We have char16ptr_t type introduced in bug 928351 to hide the difference, but that's only for constant pointers. There happened to be too few cases where this was needed for non-const pointers, so those few places (like in this case) need an explicit cast.
Thanks for review. https://hg.mozilla.org/integration/mozilla-inbound/rev/1e4f975958f2
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
(In reply to Nathan Froyd [high latency from 20 Nov through 1 December] (:froydnj) from comment #1) > Thinking about this a little more, we have a raft of 16-bit character > methods on nsString...are none of them applicable here? There is a wwc function in nsString.h which is doing a cast from char16_t* to wchar_t*.
The problem about wwc is that it's available only in nsString.h, which is used for internal string headers only. We have tests depending on FileUtilsWin.h and they don't use nsString.h, so they wouldn't build with wwc used.
You need to log in before you can comment on or make changes to this bug.