(+conformsToProtocol:): Renamed from -conformsToProtocol.

(-conformsToProtocol:): New method.
(-conformsTo:): New method.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@211 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
mccallum 1995-03-27 17:25:42 +00:00
parent f4a1f8920a
commit c4528c0434

View file

@ -158,7 +158,7 @@ BOOL NSDecrementExtraRefCountWasZero(id anObject)
return (class_get_instance_method(self, aSelector) != METHOD_NULL); return (class_get_instance_method(self, aSelector) != METHOD_NULL);
} }
- (BOOL) conformsToProtocol: (Protocol*)aProtocol + (BOOL) conformsToProtocol: (Protocol*)aProtocol
{ {
int i; int i;
struct objc_protocol_list* proto_list; struct objc_protocol_list* proto_list;
@ -168,7 +168,7 @@ BOOL NSDecrementExtraRefCountWasZero(id anObject)
{ {
for (i=0; i < proto_list->count; i++) for (i=0; i < proto_list->count; i++)
{ {
if ([proto_list->list[i] conformsTo: aProtocol]) if ([proto_list->list[i] conformsToProtocol: aProtocol])
return YES; return YES;
} }
} }
@ -179,6 +179,11 @@ BOOL NSDecrementExtraRefCountWasZero(id anObject)
return NO; return NO;
} }
- (BOOL) conformsToProtocol: (Protocol*)aProtocol
{
return [[self class] conformsToProtocol:aProtocol];
}
+ (IMP) instanceMethodForSelector: (SEL)aSelector + (IMP) instanceMethodForSelector: (SEL)aSelector
{ {
return method_get_imp(class_get_instance_method(self, aSelector)); return method_get_imp(class_get_instance_method(self, aSelector));
@ -441,6 +446,11 @@ BOOL NSDecrementExtraRefCountWasZero(id anObject)
return [self conformsToProtocol:aProtocol]; return [self conformsToProtocol:aProtocol];
} }
- (BOOL) conformsTo: (Protocol*)aProtocol
{
return [self conformsToProtocol:aProtocol];
}
- (retval_t)performv:(SEL)aSel :(arglist_t)argFrame - (retval_t)performv:(SEL)aSel :(arglist_t)argFrame
{ {
return objc_msg_sendv(self, aSel, argFrame); return objc_msg_sendv(self, aSel, argFrame);