1 /* Contributed by Nicola Pero - Fri Mar 9 19:39:15 CET 2001 */
4 #include "../../objc-obj-c++-shared/runtime.h"
6 /* Test getting and calling the IMP of a method */
15 @implementation TestClass
26 int (* imp) (id, SEL, int);
28 class = objc_getClass ("TestClass");
29 selector = @selector (next:);
30 imp = (int (*)(id, SEL, int))method_getImplementation
31 (class_getClassMethod (class, selector));
33 if (imp (class, selector, 5) != 6)