The code is for another project. I’m trying to build a (partial) Swift 
implementation of NetService. See also 
https://github.com/Bouke/NetService/tree/linux 
<https://github.com/Bouke/NetService/tree/linux>.

Apparently that protocol is EOL;

> // slated for removal, these are the swift-corelibs-only variant of the 
> _ObjectiveCBridgeable
> internal protocol _CFBridgeable {
>     associatedtype CFType
>     var _cfObject: CFType { get }
> }


—
Bouke


> On 21 Sep 2016, at 21:56, Will Stanton <willstant...@yahoo.com> wrote:
> 
> Hello Bouke,
> 
> Is that code you’re working on within SwiftFoundation or for another project?
> 
> I believe _cfObject can bridge String to CFString within SwiftFoundation (but 
> it’s an internal property), for example in NSDateFormatter.swift:
> String -> CFString
> _setFormatterAttribute(formatter, attributeName: kCFDateFormatterAMSymbol, 
> value: _amSymbol?._cfObject)
> CFString -> String
> (CFDateFormatterCopyProperty(_cfObject, kCFDateFormatterAMSymbol) as! 
> NSString)._swiftObject
> 
> 
> Within SwiftFoundation, it seems CFReadStream+CFWriteStream do not have 
> associated CFTypes. That may be because their implementations just started, 
> but I am not sure what the plan is with those classes and `protocol 
> _CFBridgeable`.
> 
> 
> Regards,
> Will Stanton
> 
>> On Sep 21, 2016, at 12:38 AM, Bouke Haarsma via swift-users 
>> <swift-users@swift.org> wrote:
>> 
>> Hi all,
>> 
>> When working with CoreFoundation objects (e.g. CFReadStream, CFWriteStream) 
>> it isn't immediately obvious to me how to bridge them to SwiftFoundation 
>> counterparts (InputStream / OutputStream).
> 

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to