From ae422ccd65c72f713ffb33319a8bc5436d8bc858 Mon Sep 17 00:00:00 2001 From: Nicola Pero Date: Fri, 15 Oct 2010 18:24:27 +0000 Subject: In libobjc/: 2010-10-15 Nicola Pero In libobjc/: 2010-10-15 Nicola Pero * Protocol.m: Include objc/runtime.h and objc-private/module-abi-8.h instead of objc/objc-api.h. Do not repeat Protocol's instance variables. (struct objc_method_description_list): Do not define here. ([-conformsTo:]): Reimplemented on top of protocol_conformsTo(). ([descriptionForInstanceMethod:]): Use sel_isEqual() to compare selectors directly instead of getting names and then using strcmp. ([descriptionForClassMethod:]): Same change. ([-isEqual:]): Reimplemented on top of protocol_isEqual(). * protocols.c (protocol_getMethodDescription): Use sel_isEqual() to compare selectors directly instead of getting names and then using strcmp. * objc/Protocol.h: Updated comments. From-SVN: r165517 --- libobjc/objc/Protocol.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'libobjc/objc') diff --git a/libobjc/objc/Protocol.h b/libobjc/objc/Protocol.h index 1f60405..ad4bbd3 100644 --- a/libobjc/objc/Protocol.h +++ b/libobjc/objc/Protocol.h @@ -35,21 +35,24 @@ extern "C" { @interface Protocol : Object { @private - char *protocol_name; - struct objc_protocol_list *protocol_list; - struct objc_method_description_list *instance_methods, *class_methods; + char *protocol_name; + struct objc_protocol_list *protocol_list; + struct objc_method_description_list *instance_methods, *class_methods; } -/* Obtaining attributes intrinsic to the protocol */ +/* The following methods have been replaced by + protocol_getName() + protocol_conformsToProtocol() + protocol_getMethodDescription() +*/ +/* Obtaining attributes intrinsic to the protocol */ - (const char *)name; /* Testing protocol conformance */ - - (BOOL) conformsTo: (Protocol *)aProtocolObject; /* Looking up information specific to a protocol */ - - (struct objc_method_description *) descriptionForInstanceMethod:(SEL)aSel; - (struct objc_method_description *) descriptionForClassMethod:(SEL)aSel; -- cgit v1.1