[swift-corelibs-dev] NSCoding methods

Luke Howard lukeh at padl.com
Tue Dec 22 17:42:45 CST 2015

> On 23 Dec 2015, at 5:16 AM, Philippe Hausler <phausler at apple.com> wrote:
>> BTW I found a couple of small CF nits:
>> * in CFDictionaryGetKeysAndValues(), keybuf and valuebuf are transposed in the call to CF_SWIFT_FUNCDISPATCHV(NSDictionary.getObjects())
>> * _CFSwiftDictionaryGetKeysAndValues() does not handle keybuf or valbuf being NULL (either of which are valid when calling CFDictionaryGetKeysAndValues())
> This is a bit un-related to NSCoding and the transposition is probably a mistake if it is inverted (the CF method should be reversed from the NS method to mimic the objc counterpart)

Right, I only noticed this whilst implementing NSKeyedArchiver.

Should _CFSwiftDictionaryGetKeysAndValues() (== NSDictionary.getObjects) follow the ObjC or the CF parameter order? The latter makes more sense to me.

— Luke

More information about the swift-corelibs-dev mailing list