aboutsummaryrefslogtreecommitdiff
path: root/libobjc/sendmsg.c
diff options
context:
space:
mode:
authorNicola Pero <nicola.pero@meta-innovation.com>2010-10-09 22:22:23 +0000
committerNicola Pero <nicola@gcc.gnu.org>2010-10-09 22:22:23 +0000
commitcf3822f181e345f952f1497d24a854ffd50cdb9e (patch)
tree4c22a690a34cb9deabdd429ff045afebaf9343b9 /libobjc/sendmsg.c
parent3a42502df4cb1fd3b8090658920bfe2635b39613 (diff)
downloadgcc-cf3822f181e345f952f1497d24a854ffd50cdb9e.zip
gcc-cf3822f181e345f952f1497d24a854ffd50cdb9e.tar.gz
gcc-cf3822f181e345f952f1497d24a854ffd50cdb9e.tar.bz2
In libobjc/: 2010-10-10 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/: 2010-10-10 Nicola Pero <nicola.pero@meta-innovation.com> * objc-foreach.c: Include objc-private/common.h. * objc/deprecated/METHOD_NULL.h: New file. * objc/objc-api.h: Include deprecated/METHOD_NULL.h instead of defining METHOD_NULL here. * Makefile.in (OBJC_DEPRECATED_H): Added METHOD_NULL.h. * Object.m ([+instancesRespondTo:]): Use (Method_t)0 instead of METHOD_NULL. ([-respondsTo:]): Same change. * objc/objc-api.h (method_get_imp): Converted it into a normal function so that we can hide the internals of struct objc_method. * sendmsg.c (method_get_imp): Implemented. From-SVN: r165241
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. */