Commit c06a8664 by Nicola Pero Committed by Nicola Pero

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
parent 1af5b8f5
2010-12-19 Nicola Pero <nicola.pero@meta-innovation.com> 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.
2010-12-19 Nicola Pero <nicola.pero@meta-innovation.com>
* init.c: Include objc-private/selector.h. Do not declare * init.c: Include objc-private/selector.h. Do not declare
__sel_register_typed_name. __sel_register_typed_name.
* objc-private/selector.h (__sel_register_typed_name): Declare. * objc-private/selector.h (__sel_register_typed_name): Declare.
......
...@@ -135,6 +135,7 @@ OBJC_DEPRECATED_H = \ ...@@ -135,6 +135,7 @@ OBJC_DEPRECATED_H = \
METHOD_NULL.h \ METHOD_NULL.h \
MetaClass.h \ MetaClass.h \
Object.h \ Object.h \
Protocol.h \
STR.h \ STR.h \
hash.h \ hash.h \
objc-list.h \ objc-list.h \
......
...@@ -27,8 +27,14 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ...@@ -27,8 +27,14 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "objc-private/module-abi-8.h" #include "objc-private/module-abi-8.h"
#include "objc/Protocol.h" #include "objc/Protocol.h"
@implementation Protocol @implementation Protocol
- (BOOL) isEqual: (id)obj
{
return protocol_isEqual (self, obj);
}
@end
@implementation Protocol (Deprecated)
- (const char *)name - (const char *)name
{ {
...@@ -97,9 +103,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ...@@ -97,9 +103,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- (unsigned) hash - (unsigned) hash
{ {
/* Compute a hash of the protocol_name; use the same hash algorithm /* Compute a hash of the protocol_name; use the same hash algorithm
* that we use for class names; protocol names and class names are that we use for class names; protocol names and class names are
* somewhat similar types of string spaces. somewhat similar types of string spaces. */
*/
int hash = 0, index; int hash = 0, index;
for (index = 0; protocol_name[index] != '\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 ...@@ -112,9 +117,4 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
return hash; return hash;
} }
- (BOOL) isEqual: (id)obj
{
return protocol_isEqual (self, obj);
}
@end @end
...@@ -39,24 +39,15 @@ extern "C" { ...@@ -39,24 +39,15 @@ extern "C" {
struct objc_protocol_list *protocol_list; struct objc_protocol_list *protocol_list;
struct objc_method_description_list *instance_methods, *class_methods; struct objc_method_description_list *instance_methods, *class_methods;
} }
@end
/* The following methods have been replaced by /* The Protocol methods have been replaced by
protocol_getName() protocol_getName()
protocol_conformsToProtocol() protocol_conformsToProtocol()
protocol_getMethodDescription() protocol_getMethodDescription()
*/ */
/* Obtaining attributes intrinsic to the protocol */ #include "deprecated/Protocol.h"
- (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;
@end
#ifdef __cplusplus #ifdef __cplusplus
} }
......
/* The following methods were deprecated in GCC 4.6.0 and will be
removed in the next GCC release. */
@interface Protocol (Deprecated)
/* 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;
@end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment