From 94e5f7b3449db5c48db78746457984d9c3967b37 Mon Sep 17 00:00:00 2001 From: theraven Date: Mon, 21 Feb 2011 13:47:12 +0000 Subject: [PATCH] Return "nil" instead of nil from class_getName with a nil argument. This is stupid (what happens if you have a class called nil?) but it is what OS X does. --- runtime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime.c b/runtime.c index 50d62e8..d4e262c 100644 --- a/runtime.c +++ b/runtime.c @@ -347,7 +347,7 @@ const char *class_getIvarLayout(Class cls) const char * class_getName(Class cls) { - CHECK_ARG(cls); + if (Nil == cls) { return "nil"; } return cls->name; }