Differences From Artifact [1e751e9c03]:
- File
src/runtime/protocol.m
— part of check-in
[df24f80ab0]
at
2012-04-08 14:06:14
on branch runtime
— Don't have any methods in Protocol.
Messaging protocols is deprecated and unreliable. Thus we shouldn't do
it in the runtime either. (user: js, size: 1431) [annotate] [blame] [check-ins using]
To Artifact [c0d1405d27]:
- File src/runtime/protocol.m — part of check-in [10c3b59143] at 2012-04-08 14:07:59 on branch runtime — Reduce locking in class_conformsToProtocol(). (user: js, size: 1392) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
27 28 29 30 31 32 33 | BOOL class_conformsToProtocol(Class cls, Protocol *p) { struct objc_protocol_list *pl; struct objc_category **cats; long i, j; | < < | < | | | > | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | BOOL class_conformsToProtocol(Class cls, Protocol *p) { 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)) return YES; } } objc_global_mutex_lock(); if ((cats = objc_categories_for_class(cls)) == NULL) { objc_global_mutex_unlock(); return NO; } for (i = 0; cats[i] != NULL; i++) { |
︙ | ︙ |