Skip to content

Commit

Permalink
Re-order to avoid complier warning
Browse files Browse the repository at this point in the history
  • Loading branch information
rfm committed Oct 28, 2024
1 parent cd8285e commit 72c0753
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions Source/NSKeyValueCoding+Caching.m
Original file line number Diff line number Diff line change
Expand Up @@ -169,17 +169,15 @@ static id _fnname(struct _KVCCacheSlot *slot, id obj) \
_getBoxedStruct(struct _KVCCacheSlot *slot, id obj)
{
NSInvocation *inv;
NSMethodSignature *sig;
size_t retSize;
const char *types = slot->types;

sig = [NSMethodSignature signatureWithObjCTypes:types];
inv = [NSInvocation invocationWithMethodSignature:sig];
[inv setSelector:slot->selector];
[inv invokeWithTarget:obj];
retSize = [sig methodReturnLength];
char ret[retSize];
[inv getReturnValue:ret];
const char *types = slot->types;
NSMethodSignature *sig = [NSMethodSignature signatureWithObjCTypes: types];
size_t retSize = [sig methodReturnLength];
char ret[retSize];

inv = [NSInvocation invocationWithMethodSignature: sig];
[inv setSelector: slot->selector];
[inv invokeWithTarget: obj];
[inv getReturnValue: ret];

return [NSValue valueWithBytes:ret objCType:[sig methodReturnType]];
}
Expand Down

0 comments on commit 72c0753

Please sign in to comment.