In gcc/testsuite/: 2010-12-19 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/testsuite/: 2010-12-19 Nicola Pero <nicola.pero@meta-innovation.com> * objc.dg/gnu-api-2-objc.m: Fixed test to test objc_lookUpClass, not objc_lookupClass. * obj-c++.dg/gnu-api-2-objc.mm: Same change. In libobjc/: 2010-12-19 Nicola Pero <nicola.pero@meta-innovation.com> * class.c (objc_lookupClass): Renamed to objc_lookUpClass. * protocols.c: Updated all calls to objc_lookupClass to call objc_lookUpClass instead. * sendmsg.c (objc_lookupClass): Do not declare. (get_imp): Update call to objc_lookupClass to call objc_lookUpClass instead. * objc/runtime.h (objc_lookupClass): Renamed to objc_lookUpClass. From-SVN: r168059
This commit is contained in:
parent
fea782052d
commit
6e45b376c6
|
@ -1,3 +1,9 @@
|
||||||
|
2010-12-19 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||||
|
|
||||||
|
* objc.dg/gnu-api-2-objc.m: Fixed test to test objc_lookUpClass,
|
||||||
|
not objc_lookupClass.
|
||||||
|
* obj-c++.dg/gnu-api-2-objc.mm: Same change.
|
||||||
|
|
||||||
2010-12-19 Nicola Pero <nicola.pero@meta-innovation.com>
|
2010-12-19 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||||
|
|
||||||
* objc.dg/gnu-api-2-objc_msg_lookup.m: New.
|
* objc.dg/gnu-api-2-objc_msg_lookup.m: New.
|
||||||
|
|
|
@ -204,9 +204,9 @@ int main ()
|
||||||
abort ();
|
abort ();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout << "Testing objc_lookupClass ()...\n";
|
std::cout << "Testing objc_lookUpClass ()...\n";
|
||||||
{
|
{
|
||||||
if (std::strcmp (class_getName (objc_lookupClass ("MyRootClass")),
|
if (std::strcmp (class_getName (objc_lookUpClass ("MyRootClass")),
|
||||||
"MyRootClass") != 0)
|
"MyRootClass") != 0)
|
||||||
abort ();
|
abort ();
|
||||||
}
|
}
|
||||||
|
|
|
@ -204,9 +204,9 @@ int main(int argc, void **args)
|
||||||
abort ();
|
abort ();
|
||||||
}
|
}
|
||||||
|
|
||||||
printf ("Testing objc_lookupClass ()...\n");
|
printf ("Testing objc_lookUpClass ()...\n");
|
||||||
{
|
{
|
||||||
if (strcmp (class_getName (objc_lookupClass ("MyRootClass")),
|
if (strcmp (class_getName (objc_lookUpClass ("MyRootClass")),
|
||||||
"MyRootClass") != 0)
|
"MyRootClass") != 0)
|
||||||
abort ();
|
abort ();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,13 @@
|
||||||
|
2010-12-19 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||||
|
|
||||||
|
* class.c (objc_lookupClass): Renamed to objc_lookUpClass.
|
||||||
|
* protocols.c: Updated all calls to objc_lookupClass to call
|
||||||
|
objc_lookUpClass instead.
|
||||||
|
* sendmsg.c (objc_lookupClass): Do not declare.
|
||||||
|
(get_imp): Update call to objc_lookupClass to call
|
||||||
|
objc_lookUpClass instead.
|
||||||
|
* objc/runtime.h (objc_lookupClass): Renamed to objc_lookUpClass.
|
||||||
|
|
||||||
2010-12-19 Nicola Pero <nicola.pero@meta-innovation.com>
|
2010-12-19 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||||
|
|
||||||
* objc/runtime.h (class_ivar_set_gcinvisible): Declare.
|
* objc/runtime.h (class_ivar_set_gcinvisible): Declare.
|
||||||
|
|
|
@ -501,7 +501,7 @@ objc_getClass (const char *name)
|
||||||
}
|
}
|
||||||
|
|
||||||
Class
|
Class
|
||||||
objc_lookupClass (const char *name)
|
objc_lookUpClass (const char *name)
|
||||||
{
|
{
|
||||||
if (name == NULL)
|
if (name == NULL)
|
||||||
return Nil;
|
return Nil;
|
||||||
|
|
|
@ -427,7 +427,7 @@ objc_EXPORT Class objc_getClass (const char *name);
|
||||||
the runtime. Return Nil if not. This function does not call the
|
the runtime. Return Nil if not. This function does not call the
|
||||||
objc_get_unknown_class_handler function if the class is not
|
objc_get_unknown_class_handler function if the class is not
|
||||||
found. */
|
found. */
|
||||||
objc_EXPORT Class objc_lookupClass (const char *name);
|
objc_EXPORT Class objc_lookUpClass (const char *name);
|
||||||
|
|
||||||
/* Return the meta class associated to the class with name 'name', if
|
/* Return the meta class associated to the class with name 'name', if
|
||||||
it is already registered with the runtime. First, it finds the
|
it is already registered with the runtime. First, it finds the
|
||||||
|
|
|
@ -145,7 +145,7 @@ class_addProtocol (Class class_, Protocol *protocol)
|
||||||
|
|
||||||
/* Check that it is a Protocol object before casting it to (struct
|
/* Check that it is a Protocol object before casting it to (struct
|
||||||
objc_protocol *). */
|
objc_protocol *). */
|
||||||
if (protocol->class_pointer != objc_lookupClass ("Protocol"))
|
if (protocol->class_pointer != objc_lookUpClass ("Protocol"))
|
||||||
return NO;
|
return NO;
|
||||||
|
|
||||||
objc_mutex_lock (__objc_runtime_mutex);
|
objc_mutex_lock (__objc_runtime_mutex);
|
||||||
|
@ -174,7 +174,7 @@ class_conformsToProtocol (Class class_, Protocol *protocol)
|
||||||
|
|
||||||
/* Check that it is a Protocol object before casting it to (struct
|
/* Check that it is a Protocol object before casting it to (struct
|
||||||
objc_protocol *). */
|
objc_protocol *). */
|
||||||
if (protocol->class_pointer != objc_lookupClass ("Protocol"))
|
if (protocol->class_pointer != objc_lookUpClass ("Protocol"))
|
||||||
return NO;
|
return NO;
|
||||||
|
|
||||||
/* Acquire the runtime lock because the list of protocols for a
|
/* Acquire the runtime lock because the list of protocols for a
|
||||||
|
@ -278,7 +278,7 @@ protocol_conformsToProtocol (Protocol *protocol, Protocol *anotherProtocol)
|
||||||
if (protocol->class_pointer != anotherProtocol->class_pointer)
|
if (protocol->class_pointer != anotherProtocol->class_pointer)
|
||||||
return NO;
|
return NO;
|
||||||
|
|
||||||
if (protocol->class_pointer != objc_lookupClass ("Protocol"))
|
if (protocol->class_pointer != objc_lookUpClass ("Protocol"))
|
||||||
return NO;
|
return NO;
|
||||||
|
|
||||||
if (strcmp (((struct objc_protocol *)protocol)->protocol_name,
|
if (strcmp (((struct objc_protocol *)protocol)->protocol_name,
|
||||||
|
@ -317,7 +317,7 @@ protocol_isEqual (Protocol *protocol, Protocol *anotherProtocol)
|
||||||
if (protocol->class_pointer != anotherProtocol->class_pointer)
|
if (protocol->class_pointer != anotherProtocol->class_pointer)
|
||||||
return NO;
|
return NO;
|
||||||
|
|
||||||
if (protocol->class_pointer != objc_lookupClass ("Protocol"))
|
if (protocol->class_pointer != objc_lookUpClass ("Protocol"))
|
||||||
return NO;
|
return NO;
|
||||||
|
|
||||||
/* Equality between formal protocols is only formal (nothing to do
|
/* Equality between formal protocols is only formal (nothing to do
|
||||||
|
@ -346,7 +346,7 @@ protocol_getName (Protocol *protocol)
|
||||||
{
|
{
|
||||||
/* Check that it is a Protocol object before casting it to (struct
|
/* Check that it is a Protocol object before casting it to (struct
|
||||||
objc_protocol *). */
|
objc_protocol *). */
|
||||||
if (protocol->class_pointer != objc_lookupClass ("Protocol"))
|
if (protocol->class_pointer != objc_lookUpClass ("Protocol"))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
return ((struct objc_protocol *)protocol)->protocol_name;
|
return ((struct objc_protocol *)protocol)->protocol_name;
|
||||||
|
@ -368,7 +368,7 @@ struct objc_method_description protocol_getMethodDescription (Protocol *protocol
|
||||||
|
|
||||||
/* Check that it is a Protocol object before casting it to (struct
|
/* Check that it is a Protocol object before casting it to (struct
|
||||||
objc_protocol *). */
|
objc_protocol *). */
|
||||||
if (protocol->class_pointer != objc_lookupClass ("Protocol"))
|
if (protocol->class_pointer != objc_lookUpClass ("Protocol"))
|
||||||
return no_result;
|
return no_result;
|
||||||
|
|
||||||
if (instanceMethod)
|
if (instanceMethod)
|
||||||
|
@ -413,7 +413,7 @@ struct objc_method_description *protocol_copyMethodDescriptionList (Protocol *pr
|
||||||
|
|
||||||
/* Check that it is a Protocol object before casting it to (struct
|
/* Check that it is a Protocol object before casting it to (struct
|
||||||
objc_protocol *). */
|
objc_protocol *). */
|
||||||
if (protocol == NULL || protocol->class_pointer != objc_lookupClass ("Protocol"))
|
if (protocol == NULL || protocol->class_pointer != objc_lookUpClass ("Protocol"))
|
||||||
{
|
{
|
||||||
if (numberOfReturnedMethods)
|
if (numberOfReturnedMethods)
|
||||||
*numberOfReturnedMethods = 0;
|
*numberOfReturnedMethods = 0;
|
||||||
|
@ -464,7 +464,7 @@ Property protocol_getProperty (Protocol *protocol, const char *propertyName,
|
||||||
|
|
||||||
/* Check that it is a Protocol object before casting it to (struct
|
/* Check that it is a Protocol object before casting it to (struct
|
||||||
objc_protocol *). */
|
objc_protocol *). */
|
||||||
if (protocol->class_pointer != objc_lookupClass ("Protocol"))
|
if (protocol->class_pointer != objc_lookUpClass ("Protocol"))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
/* TODO: New ABI. */
|
/* TODO: New ABI. */
|
||||||
|
@ -479,7 +479,7 @@ Property *protocol_copyPropertyList (Protocol *protocol, unsigned int *numberOfR
|
||||||
|
|
||||||
/* Check that it is a Protocol object before casting it to (struct
|
/* Check that it is a Protocol object before casting it to (struct
|
||||||
objc_protocol *). */
|
objc_protocol *). */
|
||||||
if (protocol == NULL || protocol->class_pointer != objc_lookupClass ("Protocol"))
|
if (protocol == NULL || protocol->class_pointer != objc_lookUpClass ("Protocol"))
|
||||||
{
|
{
|
||||||
if (numberOfReturnedProperties)
|
if (numberOfReturnedProperties)
|
||||||
*numberOfReturnedProperties = 0;
|
*numberOfReturnedProperties = 0;
|
||||||
|
@ -506,7 +506,7 @@ Protocol **protocol_copyProtocolList (Protocol *protocol, unsigned int *numberOf
|
||||||
|
|
||||||
/* Check that it is a Protocol object before casting it to (struct
|
/* Check that it is a Protocol object before casting it to (struct
|
||||||
objc_protocol *). */
|
objc_protocol *). */
|
||||||
if (protocol == NULL || protocol->class_pointer != objc_lookupClass ("Protocol"))
|
if (protocol == NULL || protocol->class_pointer != objc_lookUpClass ("Protocol"))
|
||||||
{
|
{
|
||||||
if (numberOfReturnedProtocols)
|
if (numberOfReturnedProtocols)
|
||||||
*numberOfReturnedProtocols = 0;
|
*numberOfReturnedProtocols = 0;
|
||||||
|
|
|
@ -228,9 +228,6 @@ __objc_resolve_instance_method (Class class, SEL sel)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Temporary definition until we include objc/runtime.h. */
|
|
||||||
objc_EXPORT Class objc_lookupClass (const char *name);
|
|
||||||
|
|
||||||
/* Given a class and selector, return the selector's
|
/* Given a class and selector, return the selector's
|
||||||
implementation. */
|
implementation. */
|
||||||
inline
|
inline
|
||||||
|
@ -292,7 +289,7 @@ get_imp (Class class, SEL sel)
|
||||||
need to obtain the class from the meta class,
|
need to obtain the class from the meta class,
|
||||||
which we do using the fact that both the class
|
which we do using the fact that both the class
|
||||||
and the meta-class have the same name. */
|
and the meta-class have the same name. */
|
||||||
Class realClass = objc_lookupClass (class->name);
|
Class realClass = objc_lookUpClass (class->name);
|
||||||
if (realClass)
|
if (realClass)
|
||||||
res = __objc_resolve_class_method (realClass, sel);
|
res = __objc_resolve_class_method (realClass, sel);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue