Bug 180640 - [Win] Build with -DUCHAR_TYPE=wchar_t for the stopgap for UChar change of ICU 59
Summary: [Win] Build with -DUCHAR_TYPE=wchar_t for the stopgap for UChar change of ICU 59
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-11 01:48 PST by Fujii Hironori
Modified: 2019-03-05 21:14 PST (History)
0 users

See Also:


Attachments
Patch (1012 bytes, patch)
2017-12-11 02:02 PST, Fujii Hironori
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fujii Hironori 2017-12-11 01:48:00 PST
[Win] Build with -DUCHAR_TYPE=wchar_t for the stopgap for UChar change of ICU 59

http://icu-project.org/apiref/icu4c/umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac

> Unsigned 16-bit integer. Starting with ICU 59, C++ API uses
> char16_t directly, while C API continues to use UChar.
> 
> UChar is configurable by defining the macro UCHAR_TYPE on the
> preprocessor or compiler command line: -DUCHAR_TYPE=uint16_t or
> -DUCHAR_TYPE=wchar_t (if U_SIZEOF_WCHAR_T==2) etc. (The
> UCHAR_TYPE can also be #defined earlier in this file, for outside
> the ICU library code.) This is for transitional use from
> application code that uses uint16_t or wchar_t for UTF-16.
> 
> The default is UChar=char16_t.
Comment 1 Fujii Hironori 2017-12-11 01:55:59 PST
Following compilation error are reported with ICU 59.

> C:\webkit\gb\Source\WTF\wtf/text/StringHasher.h(253): error C2535: 'UChar WTF::StringHasher::defaultConverter(UChar)': member function already defined or declared
> C:\webkit\gb\Source\WTF\wtf/text/StringHasher.h(237): note: see declaration of 'WTF::StringHasher::defaultConverter'

Becuase UChar and char16_t are identical.

>    237	    static constexpr UChar defaultConverter(UChar character)
>    238	    {
>    239	        return character;
>    240	    }
(...)
>    252	    static constexpr UChar defaultConverter(char16_t character)
>    253	    {
>    254	        return character;
>    255	    }
Comment 2 Fujii Hironori 2017-12-11 02:02:53 PST
Created attachment 328957 [details]
Patch
Comment 3 Fujii Hironori 2017-12-12 02:37:23 PST
That code was remove in Bug 180656.
Closed this bug.