Пример #1
0
def callbackPointer(closure):
    """
    Return a value for "closure" that can be passed to a function
    expecting a "void *" argument.
    """
    if not hasattr(closure, 'pyobjc_closure'):
        raise ValueError("Object is not decorated with 'callbackFor'")

    return _closurePointer(closure.pyobjc_closure)
def callbackPointer(closure):
    """
    Return a value for "closure" that can be passed to a function
    expecting a "void *" argument.
    """
    if not hasattr(closure, 'pyobjc_closure'):
        raise ValueError("Object is not decorated with 'callbackFor'")

    return _closurePointer(closure.pyobjc_closure)