diff --git a/Protocol2.m b/Protocol2.m index 8db46c3..717c6a4 100644 --- a/Protocol2.m +++ b/Protocol2.m @@ -4,12 +4,6 @@ #include #include -@implementation Protocol2 -+ (void)load -{ - objc_clear_class_flag(self, objc_class_flag_plane_aware); -} -@end @implementation Protocol + (void)load { @@ -22,6 +16,12 @@ return protocol_conformsToProtocol(self, p); } @end +@implementation Protocol2 ++ (void)load +{ + objc_clear_class_flag(self, objc_class_flag_plane_aware); +} +@end /** * This class exists for the sole reason that the legacy GNU ABI did not diff --git a/protocol.c b/protocol.c index 67d7ecd..ea00a60 100644 --- a/protocol.c +++ b/protocol.c @@ -152,7 +152,7 @@ static BOOL init_protocols(struct objc_protocol_list *protocols) protocol_class = objc_getClass("Protocol"); protocol_class2 = objc_getClass("Protocol2"); } - if (nil == protocol_class2) + if (nil == protocol_class2 || nil == protocol_class) { return NO; }