You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Darwin, kCFNull === NSNull(). Ditto kCFBooleanTrue/kCFBooleanFalse with their NSNumber equivalents.
For Swift Foundation, perhaps we need to bridge these (noting [SR-439]), or in the case of CFNull(), remove it entirely. Currently kCFBooleanTrue/kCFBooleanFalse are explicitly handled in _expensivePropertyListConversion() but that may not be the only place they escape from CF (or maybe it is – but I think it would be good to defensively avoid the kind of difficult-to-diagnose failures that could creep in if there are expectations that they are bridged).
I suppose if CoreFoundation APIs are not exported then the only risk is them escaping in objects such as property lists where CF is in charge.
NB: NSURL is the only direct consumer of kCFNull in Foundation I could find.
The text was updated successfully, but these errors were encountered:
The Core Foundation types / constants should get better Swift bridging. In the Xcode 9.4.1 toolchain, the constants are all IUOs and the types only have `var hashValue: Int`.
Or, just have the CF types become depreciated `typealiases` of their "NS" equivalents.
Attachment: Download
Additional Detail from JIRA
md5: 44891f5c40ee794a7aafe1e157827bc9
relates to:
Issue Description:
On Darwin,
kCFNull === NSNull()
. DittokCFBooleanTrue
/kCFBooleanFalse
with theirNSNumber
equivalents.For Swift Foundation, perhaps we need to bridge these (noting [SR-439]), or in the case of CFNull(), remove it entirely. Currently
kCFBooleanTrue/kCFBooleanFalse
are explicitly handled in_expensivePropertyListConversion()
but that may not be the only place they escape from CF (or maybe it is – but I think it would be good to defensively avoid the kind of difficult-to-diagnose failures that could creep in if there are expectations that they are bridged).I suppose if CoreFoundation APIs are not exported then the only risk is them escaping in objects such as property lists where CF is in charge.
NB:
NSURL
is the only direct consumer ofkCFNull
in Foundation I could find.The text was updated successfully, but these errors were encountered: