aboutsummaryrefslogtreecommitdiff
path: root/libobjc/sendmsg.c
diff options
context:
space:
mode:
Diffstat (limited to 'libobjc/sendmsg.c')
-rw-r--r--libobjc/sendmsg.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libobjc/sendmsg.c b/libobjc/sendmsg.c
index 621d531..a822af4 100644
--- a/libobjc/sendmsg.c
+++ b/libobjc/sendmsg.c
@@ -194,6 +194,13 @@ get_imp (Class class, SEL sel)
return res;
}
+/* Given a method, return its implementation. */
+IMP
+method_get_imp (Method_t method)
+{
+ return (method != (Method_t)0) ? method->method_imp : (IMP)0;
+}
+
/* Query if an object can respond to a selector, returns YES if the
object implements the selector otherwise NO. Does not check if the
method can be forwarded. */