Skip to content

Commit

Permalink
use protocol_isEqual to compare Protocols, rather than isEqual:
Browse files Browse the repository at this point in the history
It appears that -[Protocol isEqual:] is broken, at least on i386,
and doesn't recognize two equal protocols that aren't the same
pointer. The function works. Don't ask me why the method doesn't
just call through to the function....
  • Loading branch information
mikeash committed Dec 1, 2011
1 parent c4d5556 commit 2b71fab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion RTProtocol.m
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ - (NSString *)description
- (BOOL)isEqual: (id)other
{
return [other isKindOfClass: [RTProtocol class]] &&
[[self objCProtocol] isEqual: [other objCProtocol]];
protocol_isEqual([self objCProtocol], [other objCProtocol]);
}

- (NSUInteger)hash
Expand Down

0 comments on commit 2b71fab

Please sign in to comment.