mirror of
https://github.com/darlinghq/darling-corefoundation.git
synced 2024-11-30 07:10:34 +00:00
Fix invocation of __invoke__()
__invoke__() expects a character, not a string, for the return type.
This commit is contained in:
parent
a40bdc5357
commit
576490f5d9
@ -290,19 +290,21 @@
|
||||
cls = class_getSuperclass(cls);
|
||||
}
|
||||
|
||||
char rettype = [_signature methodReturnType][0];
|
||||
|
||||
if (blockClass)
|
||||
{
|
||||
struct Block_layout *block_layout = (struct Block_layout *)target;
|
||||
__invoke__(block_layout->invoke, _retdata, _frame, [_signature frameLength], [_signature methodReturnType]);
|
||||
__invoke__(block_layout->invoke, _retdata, _frame, [_signature frameLength], rettype);
|
||||
}
|
||||
else if ([_signature _stret])
|
||||
{
|
||||
char dummy[RET_SIZE_ARGS];
|
||||
__invoke__(&objc_msgSend_stret, &dummy, _frame, [_signature frameLength], [_signature methodReturnType]);
|
||||
__invoke__(&objc_msgSend_stret, &dummy, _frame, [_signature frameLength], rettype);
|
||||
}
|
||||
else
|
||||
{
|
||||
__invoke__(&objc_msgSend, _retdata, _frame, [_signature frameLength], [_signature methodReturnType]);
|
||||
__invoke__(&objc_msgSend, _retdata, _frame, [_signature frameLength], rettype);
|
||||
}
|
||||
|
||||
if (_retainedArgs)
|
||||
|
@ -4,7 +4,7 @@
|
||||
// into retdata when returning from an invocation.
|
||||
#define RET_SIZE_ARGS (4 * sizeof(int))
|
||||
|
||||
void __invoke__(void *send, void *retdata, marg_list args, size_t len, const char *rettype);
|
||||
void __invoke__(void *send, void *retdata, marg_list args, size_t len, char rettype);
|
||||
|
||||
extern void _CF_forwarding_prep_0();
|
||||
extern void _CF_forwarding_prep_1();
|
||||
|
Loading…
Reference in New Issue
Block a user