Used to be in Swift 2.x I only had to compare an unsafe pointer (obtained from a C API) to nil to know whether or not it was NULL. After conversion to Swift 3, it seems that isn’t allowed anymore.
I remember watching something about it in WWDC but I can’t remember (or find) the solution anymore. Can someone point me in the right direction?
UnsafePointer<T> is not nullable anymore. 'UnsafePointer<T>?' is
nullable, like any optional.
Dmitri
···
On Tue, Jul 5, 2016 at 3:40 PM, Vinicius Vendramini via swift-users <swift-users@swift.org> wrote:
Hi all!
Used to be in Swift 2.x I only had to compare an unsafe pointer (obtained from a C API) to nil to know whether or not it was NULL. After conversion to Swift 3, it seems that isn’t allowed anymore.
I remember watching something about it in WWDC but I can’t remember (or find) the solution anymore. Can someone point me in the right direction?