mirror of
https://github.com/apple/swift-system
synced 2026-11-25 04:47:55 +00:00
FilePath: enable building on Windows (#41)
When building on Windows, we rely on the `withPlatformString` to convert the strings to the native platform encoding (UTF-16). The public `FilePath.withPlatformString` is marked as `@_alwaysEmitIntoClient` and references the `_withPlatformString` which is marked as `internal`. Annotate the function as `@usableFromInline` to enable the inlined method to reference this function.
This commit is contained in:
1 parent
65a906baf1
commit
603718e247
1 file changed
+1
@@ -190,6 +190,7 @@ extension FilePath.Root: _PathSlice {
|
||||
}
|
||||
}
|
||||
extension FilePath: _PlatformStringable {
|
||||
@usableFromInline
|
||||
func _withPlatformString<Result>(_ body: (UnsafePointer<CInterop.PlatformChar>) throws -> Result) rethrows -> Result {
|
||||
try _storage.withPlatformString(body)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user