Skip to content

Commit

Permalink
fix xcode15 objc support
Browse files Browse the repository at this point in the history
  • Loading branch information
doronz88 committed Sep 11, 2023
1 parent e22e9de commit 6fe9cb1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions hilda/get_objectivec_class_description.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
@"super": [NSNumber numberWithLong:(uintptr_t)class_getSuperclass(objcClass)],
};

id *protocols = class_copyProtocolList(objcClass, &outCount);
id *protocolList = class_copyProtocolList(objcClass, &outCount);
for (i = 0; i < outCount; ++i) {
[classDescription[@"protocols"] addObject: [NSString stringWithCString:protocol_getName(protocols[i]) encoding:NSUTF8StringEncoding]];
[classDescription[@"protocols"] addObject: [NSString stringWithCString:protocol_getName(protocolList[i]) encoding:NSUTF8StringEncoding]];
}
if (protocols) {
free(protocols);
if (protocolList) {
free(protocolList);
}

Ivar *ivars = class_copyIvarList(objcClass, &outCount);
Expand Down
8 changes: 4 additions & 4 deletions hilda/get_objectivec_symbol_data.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
@"class_super": [NSNumber numberWithLong:(uintptr_t)class_getSuperclass(objcClass)],
};

id *protocols = class_copyProtocolList(objcClass, &outCount);
id *protocolList = class_copyProtocolList(objcClass, &outCount);
for (i = 0; i < outCount; ++i) {
[objectData[@"protocols"] addObject: [NSString stringWithCString:protocol_getName(protocols[i]) encoding:NSUTF8StringEncoding]];
[objectData[@"protocols"] addObject: [NSString stringWithCString:protocol_getName(protocolList[i]) encoding:NSUTF8StringEncoding]];
}
if (protocols) {
free(protocols);
if (protocolList) {
free(protocolList);
}

Ivar *ivars = class_copyIvarList(objcClass, &outCount);
Expand Down

0 comments on commit 6fe9cb1

Please sign in to comment.