aboutsummaryrefslogtreecommitdiff
path: root/libobjc/Protocol.m
diff options
context:
space:
mode:
authorNicola Pero <nicola.pero@meta-innovation.com>2010-12-19 00:54:27 +0000
committerNicola Pero <nicola@gcc.gnu.org>2010-12-19 00:54:27 +0000
commitc06a8664093c40aad4e27e5329cce5bb37156109 (patch)
tree38a2b1a032f14abb8b3915b79c6dae557d5a8910 /libobjc/Protocol.m
parent1af5b8f5538910672abbc5bfd882c95c2c75084e (diff)
downloadgcc-c06a8664093c40aad4e27e5329cce5bb37156109.zip
gcc-c06a8664093c40aad4e27e5329cce5bb37156109.tar.gz
gcc-c06a8664093c40aad4e27e5329cce5bb37156109.tar.bz2
In libobjc/: 2010-12-19 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/: 2010-12-19 Nicola Pero <nicola.pero@meta-innovation.com> * Protocol.m: Moved all methods, with the exception of -isEqual:, into the 'Deprecated' category. * objc/Protocol.h: Removed all methods, moved to objc/deprecated/Protocol.h. Include objc/deprecated/Protocol.h. * objc/deprecated/Protocol.h: New. * Makefile.in (OBJC_DEPRECATED_H): Added Protocol.h. From-SVN: r168040
Diffstat (limited to 'libobjc/Protocol.m')
-rw-r--r--libobjc/Protocol.m18
1 files changed, 9 insertions, 9 deletions
diff --git a/libobjc/Protocol.m b/libobjc/Protocol.m
index 27c5c76..7c920751 100644
--- a/libobjc/Protocol.m
+++ b/libobjc/Protocol.m
@@ -27,8 +27,14 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "objc-private/module-abi-8.h"
#include "objc/Protocol.h"
-
@implementation Protocol
+- (BOOL) isEqual: (id)obj
+{
+ return protocol_isEqual (self, obj);
+}
+@end
+
+@implementation Protocol (Deprecated)
- (const char *)name
{
@@ -97,9 +103,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- (unsigned) hash
{
/* Compute a hash of the protocol_name; use the same hash algorithm
- * that we use for class names; protocol names and class names are
- * somewhat similar types of string spaces.
- */
+ that we use for class names; protocol names and class names are
+ somewhat similar types of string spaces. */
int hash = 0, index;
for (index = 0; protocol_name[index] != '\0'; index++)
@@ -112,9 +117,4 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
return hash;
}
-- (BOOL) isEqual: (id)obj
-{
- return protocol_isEqual (self, obj);
-}
@end
-