File tree 1 file changed +14
-0
lines changed 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -117,8 +117,22 @@ public struct DispatchData : RandomAccessCollection {
117
117
return try body ( contentPtr)
118
118
}
119
119
120
+ @available ( swift 4 . 2 )
121
+ public func enumerateBytes(
122
+ _ block: ( _ buffer: UnsafeBufferPointer < UInt8 > , _ byteIndex: Int , _ stop: inout Bool ) -> Void )
123
+ {
124
+ enumerateBytesCommon ( block)
125
+ }
126
+
127
+ @available ( swift, obsoleted: 4.2 , renamed: " enumerateBytes(_:) " )
120
128
public func enumerateBytes(
121
129
block: ( _ buffer: UnsafeBufferPointer < UInt8 > , _ byteIndex: Int , _ stop: inout Bool ) -> Void )
130
+ {
131
+ enumerateBytesCommon ( block)
132
+ }
133
+
134
+ private func enumerateBytesCommon(
135
+ _ block: ( _ buffer: UnsafeBufferPointer < UInt8 > , _ byteIndex: Int , _ stop: inout Bool ) -> Void )
122
136
{
123
137
// we know that capturing block in the closure being created/passed to dispatch_data_apply
124
138
// does not cause block to escape because dispatch_data_apply does not allow its
You can’t perform that action at this time.
0 commit comments