From 752b7ec9d82fc61a00e4391677be6b16b6750064 Mon Sep 17 00:00:00 2001 From: theraven Date: Thu, 7 Jan 2010 13:31:18 +0000 Subject: [PATCH] Another fix for allocating runtime classes. --- runtime.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/runtime.c b/runtime.c index f2da7ed..20cb302 100644 --- a/runtime.c +++ b/runtime.c @@ -749,7 +749,9 @@ Class objc_allocateClassPair(Class superclass, const char *name, size_t extraByt // Set up the new class newClass->class_pointer = metaClass; - newClass->super_class = superclass; + // Set the superclass pointer to the name. The runtime will fix this when + // the class links are resolved. + newClass->super_class = superclass->name; newClass->name = strdup(name); newClass->info = _CLS_CLASS | _CLS_RUNTIME | _CLS_NEW_ABI; newClass->dtable = __objc_uninstalled_dtable;