mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This decreases total testing time by over a minute on my old Mac Pro. It probably has much less effect on systems with fewer cores, but shouldn't be any worse there. Swift SVN r22745
20 lines
559 B
Objective-C
20 lines
559 B
Objective-C
#include <Foundation/Foundation.h>
|
|
|
|
void slurpFastEnumerationOfArrayFromObjCImpl(id Array, id<NSFastEnumeration> FE,
|
|
NSMutableArray *Values) {
|
|
NSArray *NSA = Array;
|
|
for (NSObject *Value in FE) {
|
|
[Values addObject: Value];
|
|
}
|
|
}
|
|
|
|
void slurpFastEnumerationOfDictionaryFromObjCImpl(
|
|
id Dictionary, id<NSFastEnumeration> FE, NSMutableArray *KeyValuePairs) {
|
|
NSDictionary *NSD = Dictionary;
|
|
for (NSObject *Key in FE) {
|
|
[KeyValuePairs addObject: Key];
|
|
[KeyValuePairs addObject: NSD[Key]];
|
|
}
|
|
}
|
|
|