Correctly handle getting the name of nil. For some given value of correct, where 'correct' means 'compatible with the Apple behaviour' and not 'actually sensible'.

main
theraven 16 years ago
parent a35ece500f
commit ff7af18060

@ -424,6 +424,7 @@ IMP class_getMethodImplementation_stret(Class cls, SEL name)
const char * class_getName(Class cls)
{
if (Nil == cls) { return "nil"; }
return cls->name;
}
@ -827,6 +828,7 @@ Class object_setClass(id obj, Class cls)
const char *object_getClassName(id obj)
{
if (nil == obj) { return "nil"; }
return class_getName(object_getClass(obj));
}

Loading…
Cancel
Save