Swift 5.1 support
Use stdlib Result instead of TAsyncResult
Fix: deprecations for `withUnsafeBytes`
Bump CI job Xcode version
Hash (into)
Co-authored-by: Sophie Lambrakis <SLambrakis@users.noreply.github.com>
Co-authored-by: Alexander Edge <alex@alexedge.co.uk>
diff --git a/lib/swift/Sources/TFileTransport.swift b/lib/swift/Sources/TFileTransport.swift
index fe2253d..75eba40 100644
--- a/lib/swift/Sources/TFileTransport.swift
+++ b/lib/swift/Sources/TFileTransport.swift
@@ -88,7 +88,7 @@
public func write(data: Data) throws {
let bytesWritten = data.withUnsafeBytes {
- fwrite($0, 1, data.count, self.fileHandle)
+ fwrite($0.baseAddress!, 1, data.count, self.fileHandle)
}
if bytesWritten != data.count {
throw TTransportError(error: .unknown)