Paste: clay-objc addMethod

Author: j
Mode: text
Date: Sun, 1 Aug 2010 02:58:35
Plain Text |
[
    ReturnType, ...ArgTypes, Imp
    | Imp == CCodePointer[(Id, SEL, ...ArgTypes), ReturnType]
]
addMethod(
    class,
    selector: Selector[ReturnType, ...ArgTypes],
    imp: Imp
) {
    class_addMethod(
        class,
        selector.sel,
        RawPointer(imp),
        cstring(encode(ReturnType, Id, SEL, ...ArgTypes))
    );
}

New Annotation

Summary:
Author:
Mode:
Body: