Closed ilyannn closed 9 years ago
Swift didn't want to play nice with varargs in -numberOfInstancesWhere: (does it work for anyone else?), so I set to create an array version of it.
Swift will not work with C variadic functions.
Seems like this is an issue for many of the variadic function methods
Just made this redundant by fixing the bigger issue in c2d380a6.
Swift didn't want to play nice with varargs in
-numberOfInstancesWhere:
(does it work for anyone else?), so I set to create an array version of it.A common base for both old and new methods,
(NSUInteger)_numberOfInstancesWhere:(NSString *)queryAfterWHERE withArgumentsInArray:(NSArray *)array orVAList:(va_list)args
, was thus produced by analogy with(id)_instancesWhere:(NSString *)query andArgs:(va_list)args orArgsArray:(NSArray *)argsArray orResultSet:(FMResultSet *)existingResultSet onlyFirst:(BOOL)onlyFirst keyed:(BOOL)keyed
._Disclaimer: I tested both methods, but
va_list
is new for me, so a careful second look might be in order._