Updated for GCC 4.6

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31771 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2010-12-24 17:19:40 +00:00
parent ba3fac5d5b
commit 0a0a147ae9
4 changed files with 33 additions and 13 deletions

View file

@ -1298,6 +1298,7 @@ objc_create_block_classes_as_subclasses_of(Class super) __attribute__((weak));
*/
+ (BOOL) conformsToProtocol: (Protocol*)aProtocol
{
#ifdef __GNU_LIBOBJC__
Class c;
/* Iterate over the current class and all the superclasses. */
@ -1310,6 +1311,13 @@ objc_create_block_classes_as_subclasses_of(Class super) __attribute__((weak));
}
return NO;
#else
/* libobjc2 and ObjectiveC2/ have an implementation of
class_conformsToProtocol() which automatically looks up the
protocol in superclasses (unlike the Apple and GNU Objective-C
runtime ones). */
return class_conformsToProtocol(self, aProtocol);
#endif
}
/**