C function pointer - capturing context?

In my Reachability class I'm trying to call SCNetworkReachabilityContext and set a pointer to self as info:


        var context = SCNetworkReachabilityContext(version: 0, info: nil, retain: nil, release: nil, copyDescription: nil)
        context.info = UnsafeMutablePointer<Void>(self)


Cannot find an initializer for type 'UnsafeMutablePointer<Void>' that accepts an argument list of type '(Reachability)'


How do I achieve this?

The title to this question is wrong, but it doesn't seem that I can change it, or delete the question!

I think it will work if you use &self to get a UMP<Reachability> pointer to the instance, and then the UMP<Void> initializer can convert it.


context.info = UnsafeMutablePointer<Void>(&self)
C function pointer - capturing context?
 
 
Q