From 5df6a42107798291103cbbacade31e517c298836 Mon Sep 17 00:00:00 2001 From: theraven Date: Wed, 9 Mar 2011 14:43:45 +0000 Subject: [PATCH] Log a warning when loading the same class twice. --- class_table.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/class_table.c b/class_table.c index a648590..dd31947 100644 --- a/class_table.c +++ b/class_table.c @@ -365,20 +365,18 @@ static void reload_class(struct objc_class *class, struct objc_class *old) */ void objc_load_class(struct objc_class *class) { - /* struct objc_class *existingClass = class_table_get_safe(class->name); if (Nil != existingClass) { if (objc_developer_mode_developer != mode) { fprintf(stderr, - "Objective-C runtime error. Loading two versions of %s\n", class->name); - abort(); + "Loading two versions of %s. The class that will be used is undefined\n", + class->name); } reload_class(class, existingClass); return; } - */ // The compiler initialises the super class pointer to the name of the // superclass, not the superclass pointer.