Re: [swift-users] C interop: passing null pointers to unwrapped unsafe pointers

2016-10-08 Thread Ingo Maier via swift-users
Oh thanks, I fundamentally misunderstood how unwrapped optionals work. On Fri, Oct 7, 2016 at 6:25 PM, Joe Groff wrote: > >> On Oct 7, 2016, at 7:02 AM, Ingo Maier via swift-users >> wrote: >> >> Is there a way in Swift 3 to pass a null pointer to a C function that >> takes an implicitly unwrap

Re: [swift-users] C interop: passing null pointers to unwrapped unsafe pointers

2016-10-07 Thread Joe Groff via swift-users
> On Oct 7, 2016, at 7:02 AM, Ingo Maier via swift-users > wrote: > > Is there a way in Swift 3 to pass a null pointer to a C function that > takes an implicitly unwrapped unsafe pointer? I understand that > pointer parameters in C that don't specify nullability are mapped to > implicitly unwra

[swift-users] C interop: passing null pointers to unwrapped unsafe pointers

2016-10-07 Thread Ingo Maier via swift-users
Is there a way in Swift 3 to pass a null pointer to a C function that takes an implicitly unwrapped unsafe pointer? I understand that pointer parameters in C that don't specify nullability are mapped to implicitly unwrapped pointers in Swift 3. Since it's not uncommon for existing unannotated C API