Skip to content

Commit 054dc07

Browse files
skrtdevcursoragent
andcommitted
fix(ffi): use function pointer type for x86_64 objc_msgSend target
Xcode 26 Clang rejects storing FFI_FN(...) in a void* before ffi_call. Use void (*)(void) to match ffi_call's second parameter signature. Fixes #47 Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent f116e29 commit 054dc07

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

NativeScript/ffi/shared/jsi/NativeApiJsiInvocation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ Value callObjCSelector(Runtime& runtime,
477477
#if defined(__x86_64__)
478478
bool isStret = signature->returnType.ffiType->size > 16 &&
479479
signature->returnType.ffiType->type == FFI_TYPE_STRUCT;
480-
void* target = dispatchSuperClass != Nil
480+
void (*target)(void) = dispatchSuperClass != Nil
481481
? (isStret ? FFI_FN(objc_msgSendSuper_stret)
482482
: FFI_FN(objc_msgSendSuper))
483483
: (isStret ? FFI_FN(objc_msgSend_stret)

0 commit comments

Comments
 (0)