Skip to content

Commit 28295c5

Browse files
authored
Merge pull request #4362 from phausler/Data_fixits
[Foundation] add hints for replacement APIs for Data of some common u…
2 parents ab4dda2 + 57b2fad commit 28295c5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

stdlib/public/SDK/Foundation/Data.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,13 @@ extension Data : CustomStringConvertible, CustomDebugStringConvertible, CustomRe
733733
}
734734
}
735735

736+
extension Data {
737+
@available(*, unavailable, renamed: "copyBytes(to:count:)")
738+
public func getBytes(_ buffer: UnsafeMutablePointer<Swift.Void>, length: Int) { }
739+
740+
@available(*, unavailable, renamed: "copyBytes(to:from:)")
741+
public func getBytes(_ buffer: UnsafeMutablePointer<Swift.Void>, range: NSRange) { }
742+
}
736743

737744
/// Provides bridging functionality for struct Data to class NSData and vice-versa.
738745
extension Data : _ObjectiveCBridgeable {

0 commit comments

Comments
 (0)