mirror of
https://github.com/apple/swift-system
synced 2026-11-24 04:38:14 +00:00
Internals: use CInterop.PlatformUnicodeString on Windows (#34)
The typealias was renamed but the Windows side of the build was not updated. This prevents building System on Windows.
This commit is contained in:
1 parent
b761517c25
commit
83875613ec
1 file changed
+3
-3
@@ -85,7 +85,7 @@ extension String {
|
||||
) rethrows -> Result {
|
||||
// Need to #if because CChar may be signed
|
||||
#if os(Windows)
|
||||
return try withCString(encodedAs: _PlatformUnicodeEncoding.self, body)
|
||||
return try withCString(encodedAs: CInterop.PlatformUnicodeEncoding.self, body)
|
||||
#else
|
||||
return try withCString(body)
|
||||
#endif
|
||||
@@ -96,7 +96,7 @@ extension String {
|
||||
#if os(Windows)
|
||||
guard let strRes = String.decodeCString(
|
||||
platformString,
|
||||
as: _PlatformUnicodeEncoding.self,
|
||||
as: CInterop.PlatformUnicodeEncoding.self,
|
||||
repairingInvalidCodeUnits: false
|
||||
) else { return nil }
|
||||
assert(strRes.repairsMade == false)
|
||||
@@ -115,7 +115,7 @@ extension String {
|
||||
#if os(Windows)
|
||||
let strRes = String.decodeCString(
|
||||
platformString,
|
||||
as: _PlatformUnicodeEncoding.self,
|
||||
as: CInterop.PlatformUnicodeEncoding.self,
|
||||
repairingInvalidCodeUnits: true)
|
||||
self = strRes!.result
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user