From ac07a61dda48ef1d9564d9a40d04f0e938bdd888 Mon Sep 17 00:00:00 2001 From: Nicola Pero Date: Tue, 7 Jun 2011 20:47:12 +0000 Subject: In gcc/testsuite/: 2011-06-07 Nicola Pero Iain Sandoe In gcc/testsuite/: 2011-06-07 Nicola Pero Iain Sandoe * 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 Iain Sandoe * 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 From-SVN: r174766 --- gcc/testsuite/objc-obj-c++-shared/runtime.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'gcc/testsuite/objc-obj-c++-shared/runtime.h') diff --git a/gcc/testsuite/objc-obj-c++-shared/runtime.h b/gcc/testsuite/objc-obj-c++-shared/runtime.h index bdc2bff..4d7d1c3 100644 --- a/gcc/testsuite/objc-obj-c++-shared/runtime.h +++ b/gcc/testsuite/objc-obj-c++-shared/runtime.h @@ -93,14 +93,16 @@ struct objc_method_description protocol_getMethodDescription (Protocol *protocol struct objc_method_description result; if (instanceMethod) - { - tmp = [protocol descriptionForInstanceMethod: selector]; - result = *tmp; - } + tmp = [protocol descriptionForInstanceMethod: selector]; + else + tmp = [protocol descriptionForClassMethod: selector]; + + if (tmp) + result = *tmp; else { - tmp = [protocol descriptionForClassMethod: selector]; - result = *tmp; + result.name = (SEL)0; + result.types = (char *)0; } return result; -- cgit v1.1