Commit ac07a61d by Nicola Pero Committed by Nicola Pero

In gcc/testsuite/: 2011-06-07 Nicola Pero <nicola.pero@meta-innovation.com> Iain…

In gcc/testsuite/: 2011-06-07 Nicola Pero <nicola.pero@meta-innovation.com> Iain Sandoe <iains@gcc.gnu.org>

In gcc/testsuite/:
2011-06-07  Nicola Pero  <nicola.pero@meta-innovation.com>
	    Iain Sandoe  <iains@gcc.gnu.org>

	* objc-obj-c++-shared/runtime.h (protocol_getMethodDescription):
	Added code to deal with the case when [Protocol
	-descriptionForInstanceMethod:] or [Protocol
	-descriptionForClassMethod:] returns NULL.

2011-06-07  Nicola Pero  <nicola.pero@meta-innovation.com>
	    Iain Sandoe  <iains@gcc.gnu.org>

	* objc-obj-c++-shared/TestsuiteObject.h ([-free]): Return 'id'.
	* objc-obj-c++-shared/TestsuiteObject.m ([-free]): Return 'id'.
	Added cast.

Co-Authored-By: Iain Sandoe <iains@gcc.gnu.org>

From-SVN: r174766
parent 80e4b9e5
2011-06-07 Nicola Pero <nicola.pero@meta-innovation.com>
Iain Sandoe <iains@gcc.gnu.org>
* objc-obj-c++-shared/runtime.h (protocol_getMethodDescription):
Added code to deal with the case when [Protocol
-descriptionForInstanceMethod:] or [Protocol
-descriptionForClassMethod:] returns NULL.
2011-06-07 Nicola Pero <nicola.pero@meta-innovation.com>
Iain Sandoe <iains@gcc.gnu.org>
* objc-obj-c++-shared/TestsuiteObject.h ([-free]): Return 'id'.
* objc-obj-c++-shared/TestsuiteObject.m ([-free]): Return 'id'.
Added cast.
2011-06-07 Xinliang David Li <davidxl@google.com> 2011-06-07 Xinliang David Li <davidxl@google.com>
* testsuite/gcc.dg/inline_2.c: New test. * testsuite/gcc.dg/inline_2.c: New test.
......
...@@ -35,7 +35,7 @@ along with GCC; see the file COPYING3. If not see ...@@ -35,7 +35,7 @@ along with GCC; see the file COPYING3. If not see
+ (id) new; + (id) new;
+ (id) alloc; + (id) alloc;
- (id) init; - (id) init;
- (void) free; - (id) free;
/* Auxiliary methods. */ /* Auxiliary methods. */
+ (Class) class; + (Class) class;
......
...@@ -41,9 +41,14 @@ along with GCC; see the file COPYING3. If not see ...@@ -41,9 +41,14 @@ along with GCC; see the file COPYING3. If not see
{ {
return self; return self;
} }
- (void) free /* We return 'id' to have the same signature as [Object -free] in
older runtimes and avoid warnings about conflicting signatures. */
- (id) free
{ {
object_dispose (self); /* Cast 'self' to 'id' because the NeXT runtime in darwin8 (Apple
Mac OS X 10.4) declares object_dispose to take an "Object *"
argument. */
return object_dispose ((id)self);
} }
+ (Class) class + (Class) class
{ {
......
...@@ -93,14 +93,16 @@ struct objc_method_description protocol_getMethodDescription (Protocol *protocol ...@@ -93,14 +93,16 @@ struct objc_method_description protocol_getMethodDescription (Protocol *protocol
struct objc_method_description result; struct objc_method_description result;
if (instanceMethod) if (instanceMethod)
{ tmp = [protocol descriptionForInstanceMethod: selector];
tmp = [protocol descriptionForInstanceMethod: selector]; else
result = *tmp; tmp = [protocol descriptionForClassMethod: selector];
}
if (tmp)
result = *tmp;
else else
{ {
tmp = [protocol descriptionForClassMethod: selector]; result.name = (SEL)0;
result = *tmp; result.types = (char *)0;
} }
return result; return result;
......
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