X-Git-Url: http://git.ithinksw.org/ITFoundation.git/blobdiff_plain/692faf9cb79903190c1885a7ed08a2c97cc7fb8b..refs/heads/master:/ITCategory-NSObject.m diff --git a/ITCategory-NSObject.m b/ITCategory-NSObject.m index 36b59c5..ecd1a97 100644 --- a/ITCategory-NSObject.m +++ b/ITCategory-NSObject.m @@ -8,7 +8,7 @@ NSMutableArray *tempArray; NSArray *resultArray; Class *classes; - struct objc_class *superClass; + Class superClass; Class *current; int count, newCount, index; tempArray = [[NSMutableArray allocWithZone:nil] initWithCapacity:12]; @@ -35,14 +35,14 @@ const Class thisClass = [self class]; current = classes; for (index = 0; index < count; ++index) { - superClass = (*current)->super_class; + superClass = class_getSuperclass((*current)); if (superClass) { do { if (superClass == thisClass) { [tempArray addObject:*current]; break; } - superClass = superClass->super_class; + superClass = class_getSuperclass(superClass); } while (superClass); } ++current; @@ -87,7 +87,7 @@ current = classes; for (index = 0; index < count; ++index) { - if ((*current)->super_class == thisClass) { + if (class_getSuperclass((*current)) == thisClass) { [tempArray addObject:*current]; } ++current;