[Webkit-unassigned] [Bug 224093] ICU 69 Deprecates ubrk_safeClone in favor of ubrk_clone

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 2 02:55:08 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=224093

--- Comment #3 from Yusuke Suzuki <ysuzuki at apple.com> ---
Comment on attachment 424978
  --> https://bugs.webkit.org/attachment.cgi?id=424978
WIP Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=424978&action=review

>> Source/JavaScriptCore/runtime/IntlSegmenter.cpp:129
>> +    auto segmenter = std::unique_ptr<UBreakIterator, UBreakIteratorDeleter>(ubrk_clone(m_segmenter.get(), &status));
> 
> Since ubrk_clone is draft status, we need to hide U_HIDE_DRAFT_API definition to use it. So I suggest,
> 
> 1. Let's create a new cpp/h files, IntlWorkaround.h IntlWorkaround.cpp
> 2. Annotate @no-unify to IntlWorkaround.cpp since we want to avoid including unicode/ubrk.h without removing U_HIDE_DRAFT_API
> 3. Define a wrapper function around ubrk_clone / ubrk_safeClone in IntlWorkaround.cpp. To use draft ICU APIs, we need some special handling. Please check IntlListFormat.cpp for example :)

Or let's define a helper function in IntlSegmenter.cpp, make it @no-unify, and include the ubrk.h with appropriate or #define.
And ensure that ubrk.h is not included without draft's #define for that file.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210402/c4f07614/attachment-0001.htm>


More information about the webkit-unassigned mailing list