From 83875613ec4e4f0a0dc3fed4e932ff2eddea9cb1 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Tue, 16 Mar 2021 18:24:10 -0700 Subject: [PATCH] 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. --- Sources/System/Internals/Exports.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/System/Internals/Exports.swift b/Sources/System/Internals/Exports.swift index 5ed7d4e..2b4ae3b 100644 --- a/Sources/System/Internals/Exports.swift +++ b/Sources/System/Internals/Exports.swift @@ -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