mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Shims: adjust the ICU interface
The default ICU build will change the underlying type of the UChar type, with C++ using the builtin `char16_t` rather than `unsigned short`. This adjusts the interface to account for that. I've verified across Apple's implementation that they always use the `unsigned short` as the type for `UChar`. Since we cannot guarantee that the ICU interfaces are built the same way on all targets, especially when using the underlying system's ICU. Adjust the stubs implementation declaration to match the ICU header's declaration.
This commit is contained in:
@@ -301,7 +301,8 @@ void swift::__swift_stdlib_ubrk_close(
|
||||
|
||||
swift::__swift_stdlib_UBreakIterator *swift::__swift_stdlib_ubrk_open(
|
||||
swift::__swift_stdlib_UBreakIteratorType type, const char *locale,
|
||||
const uint16_t *text, int32_t textLength, __swift_stdlib_UErrorCode *status) {
|
||||
const __swift_stdlib_UChar *text, int32_t textLength,
|
||||
__swift_stdlib_UErrorCode *status) {
|
||||
return ptr_cast<swift::__swift_stdlib_UBreakIterator>(
|
||||
ubrk_open(static_cast<UBreakIteratorType>(type), locale,
|
||||
reinterpret_cast<const UChar *>(text), textLength,
|
||||
|
||||
Reference in New Issue
Block a user