From cf3822f181e345f952f1497d24a854ffd50cdb9e Mon Sep 17 00:00:00 2001 From: Nicola Pero Date: Sat, 9 Oct 2010 22:22:23 +0000 Subject: In libobjc/: 2010-10-10 Nicola Pero In libobjc/: 2010-10-10 Nicola Pero * 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 --- libobjc/sendmsg.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libobjc/sendmsg.c') 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. */ -- cgit v1.1