mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Linux build fixes.
This commit is contained in:
@@ -161,7 +161,7 @@ swift::_swift_stdlib_unicode_compare_utf8_utf16(const unsigned char *LeftString,
|
|||||||
UCharIterator RightIterator;
|
UCharIterator RightIterator;
|
||||||
UErrorCode ErrorCode = U_ZERO_ERROR;
|
UErrorCode ErrorCode = U_ZERO_ERROR;
|
||||||
|
|
||||||
uiter_setUTF8(&LeftIterator, LeftString, LeftLength);
|
uiter_setUTF8(&LeftIterator, reinterpret_cast<const char *>(LeftString), LeftLength);
|
||||||
#if defined(__CYGWIN__) || defined(_MSC_VER)
|
#if defined(__CYGWIN__) || defined(_MSC_VER)
|
||||||
uiter_setString(&RightIterator, reinterpret_cast<const UChar *>(RightString),
|
uiter_setString(&RightIterator, reinterpret_cast<const UChar *>(RightString),
|
||||||
RightLength);
|
RightLength);
|
||||||
@@ -191,8 +191,8 @@ swift::_swift_stdlib_unicode_compare_utf8_utf8(const unsigned char *LeftString,
|
|||||||
UCharIterator RightIterator;
|
UCharIterator RightIterator;
|
||||||
UErrorCode ErrorCode = U_ZERO_ERROR;
|
UErrorCode ErrorCode = U_ZERO_ERROR;
|
||||||
|
|
||||||
uiter_setUTF8(&LeftIterator, LeftString, LeftLength);
|
uiter_setUTF8(&LeftIterator, reinterpret_cast<const char *>(LeftString), LeftLength);
|
||||||
uiter_setUTF8(&RightIterator, RightString, RightLength);
|
uiter_setUTF8(&RightIterator, reinterpret_cast<const char *>(RightString), RightLength);
|
||||||
|
|
||||||
uint32_t Diff = ucol_strcollIter(GetRootCollator(),
|
uint32_t Diff = ucol_strcollIter(GetRootCollator(),
|
||||||
&LeftIterator, &RightIterator, &ErrorCode);
|
&LeftIterator, &RightIterator, &ErrorCode);
|
||||||
@@ -272,7 +272,7 @@ intptr_t swift::_swift_stdlib_unicode_hash_ascii(const unsigned char *Str,
|
|||||||
intptr_t HashState = HASH_SEED;
|
intptr_t HashState = HASH_SEED;
|
||||||
int32_t Pos = 0;
|
int32_t Pos = 0;
|
||||||
while (Pos < Length) {
|
while (Pos < Length) {
|
||||||
const char c = Str[Pos++];
|
const unsigned char c = Str[Pos++];
|
||||||
assert((c & 0x80) == 0 && "This table only exists for the ASCII subset");
|
assert((c & 0x80) == 0 && "This table only exists for the ASCII subset");
|
||||||
intptr_t Elem = Table->map(c);
|
intptr_t Elem = Table->map(c);
|
||||||
// Ignore zero valued collation elements. They don't participate in the
|
// Ignore zero valued collation elements. They don't participate in the
|
||||||
|
|||||||
Reference in New Issue
Block a user