From 98ee0ff066cf637d7e27887e76629b89ed3b346e Mon Sep 17 00:00:00 2001 From: Jordan Rose Date: Thu, 8 Feb 2018 19:36:35 -0800 Subject: [PATCH] Sync with 54a3597 in the Swift repository This only affects the Apple-platform implementation anyway. --- Foundation/Data.swift | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Foundation/Data.swift b/Foundation/Data.swift index 098c25e879..8e016504af 100644 --- a/Foundation/Data.swift +++ b/Foundation/Data.swift @@ -54,9 +54,6 @@ internal func __NSDataIsCompact(_ data: NSData) -> Bool { } } -@_silgen_name("__NSDataWriteToURL") -internal func __NSDataWriteToURL(_ data: NSData, _ url: NSURL, _ options: UInt, _ error: NSErrorPointer) -> Bool - #endif public final class _DataStorage { @@ -1417,9 +1414,9 @@ public struct Data : ReferenceConvertible, Equatable, Hashable, RandomAccessColl #else if _shouldUseNonAtomicWriteReimplementation(options: options) { var error: NSError? = nil - guard __NSDataWriteToURL($0, url as NSURL, options.rawValue, &error) else { throw error! } + guard __NSDataWriteToURL($0, url, options, &error) else { throw error! } } else { - try $0.write(to: url, options: WritingOptions(rawValue: options.rawValue)) + try $0.write(to: url, options: options) } #endif }