OSX compatibility tweaks for class_getName()

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29881 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2010-03-08 17:25:47 +00:00
parent 243ff737df
commit 82a47f512d

View file

@ -463,7 +463,15 @@ class_getMethodImplementation_stret(Class cls, SEL name)
const char *
class_getName(Class cls)
{
return class_get_class_name(cls);
if (cls == Nil)
{
return "nil"; // This is what OSX does.
}
if (CLS_ISCLASS(cls) || CLS_ISMETA(cls))
{
return cls->name;
}
return NULL;
}
void __objc_resolve_class_links(void);