mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[stdlib] added @noescape to withUnsafeBufferPointer functions
rdar://problem/19389247 Swift SVN r24969
This commit is contained in:
@@ -65,7 +65,7 @@ public struct _UnitTestArrayBuffer<T> : _ArrayBufferType {
|
||||
/// Call `body(p)`, where `p` is an `UnsafeBufferPointer` over the
|
||||
/// underlying contiguous storage.
|
||||
public func withUnsafeBufferPointer<R>(
|
||||
body: (UnsafeBufferPointer<Element>)->R
|
||||
@noescape body: UnsafeBufferPointer<Element> -> R
|
||||
) -> R {
|
||||
let ret = body(UnsafeBufferPointer(start: self.baseAddress, count: count))
|
||||
_fixLifetime(self)
|
||||
@@ -75,7 +75,7 @@ public struct _UnitTestArrayBuffer<T> : _ArrayBufferType {
|
||||
/// Call `body(p)`, where `p` is an `UnsafeMutableBufferPointer`
|
||||
/// over the underlying contiguous storage.
|
||||
public mutating func withUnsafeMutableBufferPointer<R>(
|
||||
body: (UnsafeMutableBufferPointer<T>)->R
|
||||
@noescape body: UnsafeMutableBufferPointer<T> -> R
|
||||
) -> R {
|
||||
let ret = body(
|
||||
UnsafeMutableBufferPointer(start: baseAddress, count: count))
|
||||
|
||||
Reference in New Issue
Block a user