Skip to content

Commit 8387561

Browse files
authored
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.
1 parent b761517 commit 8387561

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sources/System/Internals/Exports.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ extension String {
8585
) rethrows -> Result {
8686
// Need to #if because CChar may be signed
8787
#if os(Windows)
88-
return try withCString(encodedAs: _PlatformUnicodeEncoding.self, body)
88+
return try withCString(encodedAs: CInterop.PlatformUnicodeEncoding.self, body)
8989
#else
9090
return try withCString(body)
9191
#endif
@@ -96,7 +96,7 @@ extension String {
9696
#if os(Windows)
9797
guard let strRes = String.decodeCString(
9898
platformString,
99-
as: _PlatformUnicodeEncoding.self,
99+
as: CInterop.PlatformUnicodeEncoding.self,
100100
repairingInvalidCodeUnits: false
101101
) else { return nil }
102102
assert(strRes.repairsMade == false)
@@ -115,7 +115,7 @@ extension String {
115115
#if os(Windows)
116116
let strRes = String.decodeCString(
117117
platformString,
118-
as: _PlatformUnicodeEncoding.self,
118+
as: CInterop.PlatformUnicodeEncoding.self,
119119
repairingInvalidCodeUnits: true)
120120
self = strRes!.result
121121
return

0 commit comments

Comments
 (0)