Skip to content

Commit e44db1e

Browse files
committed
stdlib: add @NoEscape in ManagedBuffer APIs
These APIs were missed during earlier audits.
1 parent 49b3654 commit e44db1e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

stdlib/public/core/ManagedBuffer.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public class ManagedProtoBuffer<Value, Element> : NonObjectiveCBase {
4545
/// - Note: This pointer is only valid for the duration of the
4646
/// call to `body`.
4747
public final func withUnsafeMutablePointerToValue<R>(
48-
_ body: (UnsafeMutablePointer<Value>) -> R
48+
_ body: @noescape (UnsafeMutablePointer<Value>) -> R
4949
) -> R {
5050
return withUnsafeMutablePointers { (v, e) in return body(v) }
5151
}
@@ -56,7 +56,7 @@ public class ManagedProtoBuffer<Value, Element> : NonObjectiveCBase {
5656
/// - Note: This pointer is only valid for the duration of the
5757
/// call to `body`.
5858
public final func withUnsafeMutablePointerToElements<R>(
59-
_ body: (UnsafeMutablePointer<Element>) -> R
59+
_ body: @noescape (UnsafeMutablePointer<Element>) -> R
6060
) -> R {
6161
return withUnsafeMutablePointers { return body($0.1) }
6262
}
@@ -67,7 +67,7 @@ public class ManagedProtoBuffer<Value, Element> : NonObjectiveCBase {
6767
/// - Note: These pointers are only valid for the duration of the
6868
/// call to `body`.
6969
public final func withUnsafeMutablePointers<R>(
70-
_ body: (_: UnsafeMutablePointer<Value>, _: UnsafeMutablePointer<Element>) -> R
70+
_ body: @noescape (UnsafeMutablePointer<Value>, UnsafeMutablePointer<Element>) -> R
7171
) -> R {
7272
return ManagedBufferPointer(self).withUnsafeMutablePointers(body)
7373
}
@@ -99,7 +99,7 @@ public class ManagedBuffer<Value, Element>
9999
/// generate an initial `Value`.
100100
public final class func create(
101101
minimumCapacity: Int,
102-
initialValue: (ManagedProtoBuffer<Value, Element>) -> Value
102+
initialValue: @noescape (ManagedProtoBuffer<Value, Element>) -> Value
103103
) -> ManagedBuffer<Value, Element> {
104104

105105
let p = ManagedBufferPointer<Value, Element>(
@@ -185,7 +185,7 @@ public struct ManagedBufferPointer<Value, Element> : Equatable {
185185
public init(
186186
bufferClass: AnyClass,
187187
minimumCapacity: Int,
188-
initialValue: (buffer: AnyObject, capacity: (AnyObject) -> Int) -> Value
188+
initialValue: @noescape (buffer: AnyObject, capacity: @noescape (AnyObject) -> Int) -> Value
189189
) {
190190
self = ManagedBufferPointer(bufferClass: bufferClass, minimumCapacity: minimumCapacity)
191191

@@ -268,7 +268,7 @@ public struct ManagedBufferPointer<Value, Element> : Equatable {
268268
/// - Note: This pointer is only valid for the duration of the
269269
/// call to `body`.
270270
public func withUnsafeMutablePointerToElements<R>(
271-
_ body: (UnsafeMutablePointer<Element>) -> R
271+
_ body: @noescape (UnsafeMutablePointer<Element>) -> R
272272
) -> R {
273273
return withUnsafeMutablePointers { return body($0.1) }
274274
}
@@ -279,7 +279,7 @@ public struct ManagedBufferPointer<Value, Element> : Equatable {
279279
/// - Note: These pointers are only valid for the duration of the
280280
/// call to `body`.
281281
public func withUnsafeMutablePointers<R>(
282-
_ body: @noescape (_: UnsafeMutablePointer<Value>, _: UnsafeMutablePointer<Element>) -> R
282+
_ body: @noescape (UnsafeMutablePointer<Value>, UnsafeMutablePointer<Element>) -> R
283283
) -> R {
284284
let result = body(_valuePointer, _elementPointer)
285285
_fixLifetime(_nativeBuffer)

0 commit comments

Comments
 (0)