I am using wxPython (Project Phoenix) with pyobjc to develop native OS X applications. Since Project Phoenix migrated to sip, code like this will not work:

    objc.objc_object(c_void_p=self.MacGetTopLevelWindowRef())

There is a way to convert sip.voidptr to ctypes.c_void_p which can be used with pyobjc:

import ctypes


def get_c_void_p(void_ptr):
    return ctypes.c_void_p(int(void_ptr))