@@ -134,11 +134,11 @@ - (NSData *)sortedArrayHint {
134
134
LOCK (NSData * d = [_arr sortedArrayHint ]); return d;
135
135
}
136
136
137
- - (NSArray *)sortedArrayUsingFunction : (NSInteger (*)(id , id , void *))comparator context : (void *)context {
137
+ - (NSArray *)sortedArrayUsingFunction : (NSInteger (NS_NOESCAPE *)(id , id , void *))comparator context : (void *)context {
138
138
LOCK (NSArray * arr = [_arr sortedArrayUsingFunction: comparator context: context]) return arr;
139
139
}
140
140
141
- - (NSArray *)sortedArrayUsingFunction : (NSInteger (*)(id , id , void *))comparator context : (void *)context hint : (NSData *)hint {
141
+ - (NSArray *)sortedArrayUsingFunction : (NSInteger (NS_NOESCAPE *)(id , id , void *))comparator context : (void *)context hint : (NSData *)hint {
142
142
LOCK (NSArray * arr = [_arr sortedArrayUsingFunction: comparator context: context hint: hint]); return arr;
143
143
}
144
144
@@ -166,51 +166,51 @@ - (id)objectAtIndexedSubscript:(NSUInteger)idx {
166
166
LOCK (id o = [_arr objectAtIndexedSubscript: idx]); return o;
167
167
}
168
168
169
- - (void )enumerateObjectsUsingBlock : (void (^)(id obj, NSUInteger idx, BOOL *stop))block {
169
+ - (void )enumerateObjectsUsingBlock : (void (NS_NOESCAPE ^)(id obj, NSUInteger idx, BOOL *stop))block {
170
170
LOCK ([_arr enumerateObjectsUsingBlock: block]);
171
171
}
172
172
173
- - (void )enumerateObjectsWithOptions : (NSEnumerationOptions )opts usingBlock : (void (^)(id obj, NSUInteger idx, BOOL *stop))block {
173
+ - (void )enumerateObjectsWithOptions : (NSEnumerationOptions )opts usingBlock : (void (NS_NOESCAPE ^)(id obj, NSUInteger idx, BOOL *stop))block {
174
174
LOCK ([_arr enumerateObjectsWithOptions: opts usingBlock: block]);
175
175
}
176
176
177
- - (void )enumerateObjectsAtIndexes : (NSIndexSet *)s options : (NSEnumerationOptions )opts usingBlock : (void (^)(id obj, NSUInteger idx, BOOL *stop))block {
177
+ - (void )enumerateObjectsAtIndexes : (NSIndexSet *)s options : (NSEnumerationOptions )opts usingBlock : (void (NS_NOESCAPE ^)(id obj, NSUInteger idx, BOOL *stop))block {
178
178
LOCK ([_arr enumerateObjectsAtIndexes: s options: opts usingBlock: block]);
179
179
}
180
180
181
- - (NSUInteger )indexOfObjectPassingTest : (BOOL (^)(id obj, NSUInteger idx, BOOL *stop))predicate {
181
+ - (NSUInteger )indexOfObjectPassingTest : (BOOL (NS_NOESCAPE ^)(id obj, NSUInteger idx, BOOL *stop))predicate {
182
182
LOCK (NSUInteger i = [_arr indexOfObjectPassingTest: predicate]); return i;
183
183
}
184
184
185
- - (NSUInteger )indexOfObjectWithOptions : (NSEnumerationOptions )opts passingTest : (BOOL (^)(id obj, NSUInteger idx, BOOL *stop))predicate {
185
+ - (NSUInteger )indexOfObjectWithOptions : (NSEnumerationOptions )opts passingTest : (BOOL (NS_NOESCAPE ^)(id obj, NSUInteger idx, BOOL *stop))predicate {
186
186
LOCK (NSUInteger i = [_arr indexOfObjectWithOptions: opts passingTest: predicate]); return i;
187
187
}
188
188
189
- - (NSUInteger )indexOfObjectAtIndexes : (NSIndexSet *)s options : (NSEnumerationOptions )opts passingTest : (BOOL (^)(id obj, NSUInteger idx, BOOL *stop))predicate {
189
+ - (NSUInteger )indexOfObjectAtIndexes : (NSIndexSet *)s options : (NSEnumerationOptions )opts passingTest : (BOOL (NS_NOESCAPE ^)(id obj, NSUInteger idx, BOOL *stop))predicate {
190
190
LOCK (NSUInteger i = [_arr indexOfObjectAtIndexes: s options: opts passingTest: predicate]); return i;
191
191
}
192
192
193
- - (NSIndexSet *)indexesOfObjectsPassingTest : (BOOL (^)(id obj, NSUInteger idx, BOOL *stop))predicate {
193
+ - (NSIndexSet *)indexesOfObjectsPassingTest : (BOOL (NS_NOESCAPE ^)(id obj, NSUInteger idx, BOOL *stop))predicate {
194
194
LOCK (NSIndexSet * i = [_arr indexesOfObjectsPassingTest: predicate]); return i;
195
195
}
196
196
197
- - (NSIndexSet *)indexesOfObjectsWithOptions : (NSEnumerationOptions )opts passingTest : (BOOL (^)(id obj, NSUInteger idx, BOOL *stop))predicate {
197
+ - (NSIndexSet *)indexesOfObjectsWithOptions : (NSEnumerationOptions )opts passingTest : (BOOL (NS_NOESCAPE ^)(id obj, NSUInteger idx, BOOL *stop))predicate {
198
198
LOCK (NSIndexSet * i = [_arr indexesOfObjectsWithOptions: opts passingTest: predicate]); return i;
199
199
}
200
200
201
- - (NSIndexSet *)indexesOfObjectsAtIndexes : (NSIndexSet *)s options : (NSEnumerationOptions )opts passingTest : (BOOL (^)(id obj, NSUInteger idx, BOOL *stop))predicate {
201
+ - (NSIndexSet *)indexesOfObjectsAtIndexes : (NSIndexSet *)s options : (NSEnumerationOptions )opts passingTest : (BOOL (NS_NOESCAPE ^)(id obj, NSUInteger idx, BOOL *stop))predicate {
202
202
LOCK (NSIndexSet * i = [_arr indexesOfObjectsAtIndexes: s options: opts passingTest: predicate]); return i;
203
203
}
204
204
205
- - (NSArray *)sortedArrayUsingComparator : (NSComparator )cmptr {
205
+ - (NSArray *)sortedArrayUsingComparator : (NSComparator NS_NOESCAPE )cmptr {
206
206
LOCK (NSArray * a = [_arr sortedArrayUsingComparator: cmptr]); return a;
207
207
}
208
208
209
- - (NSArray *)sortedArrayWithOptions : (NSSortOptions )opts usingComparator : (NSComparator )cmptr {
209
+ - (NSArray *)sortedArrayWithOptions : (NSSortOptions )opts usingComparator : (NSComparator NS_NOESCAPE )cmptr {
210
210
LOCK (NSArray * a = [_arr sortedArrayWithOptions: opts usingComparator: cmptr]); return a;
211
211
}
212
212
213
- - (NSUInteger )indexOfObject : (id )obj inSortedRange : (NSRange )r options : (NSBinarySearchingOptions )opts usingComparator : (NSComparator )cmp {
213
+ - (NSUInteger )indexOfObject : (id )obj inSortedRange : (NSRange )r options : (NSBinarySearchingOptions )opts usingComparator : (NSComparator NS_NOESCAPE )cmp {
214
214
LOCK (NSUInteger i = [_arr indexOfObject: obj inSortedRange: r options: opts usingComparator: cmp]); return i;
215
215
}
216
216
@@ -284,7 +284,7 @@ - (void)setArray:(NSArray *)otherArray {
284
284
LOCK ([_arr setArray: otherArray]);
285
285
}
286
286
287
- - (void )sortUsingFunction : (NSInteger (*)(id , id , void *))compare context : (void *)context {
287
+ - (void )sortUsingFunction : (NSInteger (NS_NOESCAPE *)(id , id , void *))compare context : (void *)context {
288
288
LOCK ([_arr sortUsingFunction: compare context: context]);
289
289
}
290
290
@@ -308,11 +308,11 @@ - (void)setObject:(id)obj atIndexedSubscript:(NSUInteger)idx {
308
308
LOCK ([_arr setObject: obj atIndexedSubscript: idx]);
309
309
}
310
310
311
- - (void )sortUsingComparator : (NSComparator )cmptr {
311
+ - (void )sortUsingComparator : (NSComparator NS_NOESCAPE )cmptr {
312
312
LOCK ([_arr sortUsingComparator: cmptr]);
313
313
}
314
314
315
- - (void )sortWithOptions : (NSSortOptions )opts usingComparator : (NSComparator )cmptr {
315
+ - (void )sortWithOptions : (NSSortOptions )opts usingComparator : (NSComparator NS_NOESCAPE )cmptr {
316
316
LOCK ([_arr sortWithOptions: opts usingComparator: cmptr]);
317
317
}
318
318
0 commit comments