Closed
Bug 924011
Opened 11 years ago
Closed 11 years ago
Do not assume that PRUnichar and UChar are the same type
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla27
People
(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)
References
Details
Attachments
(1 file, 1 obsolete file)
9.33 KB,
patch
|
Waldo
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Attachment #814016 -
Flags: review?(jwalden+bmo)
Comment 1•11 years ago
|
||
It's worth noting that there's a macro you can set to make ICU define UChar to char16_t instead.
Assignee | ||
Comment 2•11 years ago
|
||
(In reply to Joshua Cranmer [:jcranmer] from comment #1)
> It's worth noting that there's a macro you can set to make ICU define UChar
> to char16_t instead.
What is that macro? That sounds fine to me, personally.
Comment 3•11 years ago
|
||
The macro would be fine, if it won't break Linux distros that link against a system ICU. I don't know if that'll be a problem or not, exactly.
Comment 4•11 years ago
|
||
Comment on attachment 814016 [details] [diff] [review]
Patch (v1)
Review of attachment 814016 [details] [diff] [review]:
-----------------------------------------------------------------
Let's consolidate all these casts into a single cast in a utility method in Intl.h.
inline const UChar *
JSCharToUChar(const jschar *chars)
{
return reinterpret_cast<const UChar*>(chars);
}
Or something along those lines.
Given leeriness about the system ICU thing, let's punt on the macro bit until distros have implemented a system-ICU option (which presumably they've held off on because bug 853301 hasn't landed yet).
Attachment #814016 -
Flags: review?(jwalden+bmo)
Assignee | ||
Comment 5•11 years ago
|
||
Attachment #814525 -
Flags: review?(jwalden+bmo)
Assignee | ||
Updated•11 years ago
|
Attachment #814016 -
Attachment is obsolete: true
Comment 6•11 years ago
|
||
Comment on attachment 814525 [details] [diff] [review]
Patch (v2)
Review of attachment 814525 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/builtin/Intl.h
@@ +186,5 @@
> +JSCharToUChar(const jschar *chars)
> +{
> + return reinterpret_cast<const UChar *>(chars);
> +}
> +inline UChar *
Blank line before this.
Attachment #814525 -
Flags: review?(jwalden+bmo) → review+
Assignee | ||
Comment 7•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
You need to log in
before you can comment on or make changes to this bug.
Description
•