Index: src/runtime/class.m ================================================================== --- src/runtime/class.m +++ src/runtime/class.m @@ -47,10 +47,25 @@ for (ml = cls->methodlist; ml != NULL; ml = ml->next) for (i = 0; i < ml->count; i++) objc_register_selector( (struct objc_abi_selector*)&ml->methods[i]); } + +inline Class +objc_classname_to_class(const char *name) +{ + Class c; + + if (classes == NULL) + return Nil; + + objc_global_mutex_lock(); + c = (Class)objc_hashtable_get(classes, name); + objc_global_mutex_unlock(); + + return c; +} static void call_method(Class cls, const char *method) { struct objc_method_list *ml; @@ -284,25 +299,10 @@ ERROR("Not enough memory for load queue!"); } } } -inline Class -objc_classname_to_class(const char *name) -{ - Class c; - - if (classes == NULL) - return Nil; - - objc_global_mutex_lock(); - c = (Class)objc_hashtable_get(classes, name); - objc_global_mutex_unlock(); - - return c; -} - inline Class objc_lookup_class(const char *name) { Class cls = objc_classname_to_class(name);