Index: src/runtime/protocol.m ================================================================== --- src/runtime/protocol.m +++ src/runtime/protocol.m @@ -58,16 +58,14 @@ { struct objc_protocol_list *pl; struct objc_category **cats; long i, j; - for (pl = cls->protocols; pl != NULL; pl = pl->next) { - for (i = 0; i < pl->count; i++) { - if (!strcmp(pl->list[i]->name, p->name)) + for (pl = cls->protocols; pl != NULL; pl = pl->next) + for (i = 0; i < pl->count; i++) + if (protocol_conformsToProtocol(pl->list[i], p)) return YES; - } - } objc_global_mutex_lock(); if ((cats = objc_categories_for_class(cls)) == NULL) { objc_global_mutex_unlock(); @@ -75,11 +73,12 @@ } for (i = 0; cats[i] != NULL; i++) { for (pl = cats[i]->protocols; pl != NULL; pl = pl->next) { for (j = 0; j < pl->count; j++) { - if (!strcmp(pl->list[j]->name, p->name)) { + if (protocol_conformsToProtocol( + pl->list[j], p)) { objc_global_mutex_unlock(); return YES; } } }