mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
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:
parent
243ff737df
commit
82a47f512d
1 changed files with 9 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue