Log a warning when loading the same class twice.

main
theraven 15 years ago
parent e11e8dee46
commit 5df6a42107

@ -365,20 +365,18 @@ static void reload_class(struct objc_class *class, struct objc_class *old)
*/ */
void objc_load_class(struct objc_class *class) void objc_load_class(struct objc_class *class)
{ {
/*
struct objc_class *existingClass = class_table_get_safe(class->name); struct objc_class *existingClass = class_table_get_safe(class->name);
if (Nil != existingClass) if (Nil != existingClass)
{ {
if (objc_developer_mode_developer != mode) if (objc_developer_mode_developer != mode)
{ {
fprintf(stderr, fprintf(stderr,
"Objective-C runtime error. Loading two versions of %s\n", class->name); "Loading two versions of %s. The class that will be used is undefined\n",
abort(); class->name);
} }
reload_class(class, existingClass); reload_class(class, existingClass);
return; return;
} }
*/
// The compiler initialises the super class pointer to the name of the // The compiler initialises the super class pointer to the name of the
// superclass, not the superclass pointer. // superclass, not the superclass pointer.

Loading…
Cancel
Save