In libobjc/: 2011-06-07 Nicola Pero <nicola.pero@meta-innovation.com>

In libobjc/:
2011-06-07  Nicola Pero  <nicola.pero@meta-innovation.com>

	Removed the Traditional Objective-C runtime public API.
	* Makefile.in (OBJC_DEPRECATED_H): Variable removed.
	(install-headers): Do not create the objc/deprecated directory and
	do not install the deprecated headers.
	(OBJC_H): Removed encoding.h and objc-api.h.
	* Object.m: Removed all methods with the exception of -class and
	-isEqual:.  Updated includes.  ([-class]): Use Modern API.
	* objc/Object.h: Do not include deprecated/Object.h.
	* objc/deprecated/Object.h: Removed.
	* linking.m (__objc_linking): Call [Object class] instead of
	[Object name].
	* Protocol.m: Removed all methods with the exception of -isEqual:.
	Updated includes.
	* objc/Protocol.h: Do not include deprecated/Protocol.h.
	* objc/deprecated/Protocol.h: Removed.
	* objc/deprecated/struct_objc_symtab.h: Removed.
	* objc/deprecated/struct_objc_module.h: Removed.
	* objc/deprecated/struct_objc_ivar.h: Removed.
	* objc/deprecated/struct_objc_ivar_list.h: Removed.
	* objc/deprecated/struct_objc_method.h: Removed.
	* objc/deprecated/struct_objc_method_list.h: Removed.
	* objc/deprecated/struct_objc_protocol_list.h: Removed.
	* objc/deprecated/struct_objc_category.h: Removed.
	* objc/deprecated/MetaClass.h: Removed.
	* objc/deprecated/objc_msg_sendv.h: Removed.  
	* objc/deprecated/README: Removed.
	* objc/deprecated/struct_objc_class.h: Removed.
	* objc/deprecated/struct_objc_protocol.h: Removed.
	* objc/deprecated/struct_objc_selector.h: Removed.
	* objc/encoding.h: Removed.
	* objc/message.h (struct objc_super): Removed the definition for
	the Traditional Objective-C runtime API.
	* objc/objc.h: Do not include objc/objc-decls.h.
	deprecated/struct_objc_selector.h, deprecated/MetaClass.h,
	deprecated/struct_objc_class.h, deprecated/struct_objc_protocol.h
	and deprecated/objc_msg_sendv.h.  Uncommented new definition of
	Protocol *.
	* objc/objc-api.h: Removed.
	* objc/runtime.h: Updated comments.  Removed check to detect
	concurrent usage of Traditional and Modern APIs.
	* objc-private/module-abi-8.h: Always define struct objc_class and
	struct objc_protocol.  (struct objc_protocol_list): Changed type
	of 'list' argument from 'Protocol *' to 'struct objc_protocol *'.
	(class_get_instance_size): Added.
	* objc-private/protocols.h (__objc_protocols_add_protocol): Take a
	'struct objc_protocol *' as argument, not a 'Protocol *'.
	* objc-private/runtime.h: Updated comments.
	* objc-private/selector.h (struct objc_selector, sel_eq): Added.
	* class.c: Include objc-private/selector.h.
	(objc_get_meta_class): Return a Class instead of a MetaClass.
	* encoding.c (method_get_next_argument): Removed.
	(method_get_first_argument): Removed.
	(method_get_nth_argument): Removed.
	* gc.c: Include objc/runtime.h instead of objc/encoding.h.
	Include objc-private/module-abi-8.h and ctype.h.
	* protocols.c (__objc_protocols_add_protocol): Take a 'struct
	objc_protocl *' as argument, not a 'Protocol *'.
	(class_addProtocol): Added casts to 'struct objc_protocol *' and
	'Protocol *'.
	(class_copyProtocolList): Likewise.
	(protocol_conformsToProtocol): Likewise.
	(protocol_copyProtocolList): Likewise.
	* sarray.c: Include objc-private/module-abi-8.h.
	* sendmsg.c (method_get_next_argument): Removed.
	(method_get_first_argument): Removed.
	(method_get_nth_argument): Removed.
	(objc_msg_sendv): Removed.
	(arglist_t, retval_t): New.  (class_get_class_method): Take a
	'Class', not 'MetaClass', argument.
	* thr.c: Include module-abi-8.h.

From-SVN: r174765
This commit is contained in:
Nicola Pero 2011-06-07 19:37:35 +00:00 committed by Nicola Pero
parent bb5b1f5e73
commit 80e4b9e501
39 changed files with 133 additions and 1367 deletions

View file

@ -55,7 +55,7 @@ __objc_protocols_init (void)
/* Add a protocol to the hashtable. */
void
__objc_protocols_add_protocol (const char *name, Protocol *object)
__objc_protocols_add_protocol (const char *name, struct objc_protocol *object)
{
objc_mutex_lock (__protocols_hashtable_lock);
@ -153,7 +153,7 @@ class_addProtocol (Class class_, Protocol *protocol)
/* Create the objc_protocol_list. */
protocols = malloc (sizeof (struct objc_protocol_list));
protocols->count = 1;
protocols->list[0] = protocol;
protocols->list[0] = (struct objc_protocol *)protocol;
/* Attach it to the list of class protocols. */
protocols->next = class_->protocols;
@ -189,8 +189,8 @@ class_conformsToProtocol (Class class_, Protocol *protocol)
size_t i;
for (i = 0; i < proto_list->count; i++)
{
if (proto_list->list[i] == protocol
|| protocol_conformsToProtocol (proto_list->list[i],
if (proto_list->list[i] == (struct objc_protocol *)protocol
|| protocol_conformsToProtocol ((Protocol *)proto_list->list[i],
protocol))
{
objc_mutex_unlock (__objc_runtime_mutex);
@ -246,7 +246,7 @@ class_copyProtocolList (Class class_, unsigned int *numberOfReturnedProtocols)
size_t j;
for (j = 0; j < proto_list->count; j++)
{
returnValue[i] = proto_list->list[j];
returnValue[i] = (Protocol *)proto_list->list[j];
i++;
}
proto_list = proto_list->next;
@ -294,7 +294,7 @@ protocol_conformsToProtocol (Protocol *protocol, Protocol *anotherProtocol)
for (i = 0; i < proto_list->count; i++)
{
if (protocol_conformsToProtocol (proto_list->list[i], anotherProtocol))
if (protocol_conformsToProtocol ((Protocol *)proto_list->list[i], anotherProtocol))
return YES;
}
proto_list = proto_list->next;
@ -541,7 +541,7 @@ Protocol **protocol_copyProtocolList (Protocol *protocol, unsigned int *numberOf
size_t j;
for (j = 0; j < proto_list->count; j++)
{
returnValue[i] = proto_list->list[j];
returnValue[i] = (Protocol *)proto_list->list[j];
i++;
}
proto_list = proto_list->next;