From 054dc070475bc0f2b1fb1f44b23dbc8803f88d9a Mon Sep 17 00:00:00 2001 From: gaetano <64538010+skrtdev@users.noreply.github.com> Date: Fri, 24 Jul 2026 15:56:27 +0200 Subject: [PATCH] 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 --- NativeScript/ffi/shared/jsi/NativeApiJsiInvocation.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NativeScript/ffi/shared/jsi/NativeApiJsiInvocation.h b/NativeScript/ffi/shared/jsi/NativeApiJsiInvocation.h index fe45f29fc..fdc21b5b1 100644 --- a/NativeScript/ffi/shared/jsi/NativeApiJsiInvocation.h +++ b/NativeScript/ffi/shared/jsi/NativeApiJsiInvocation.h @@ -477,7 +477,7 @@ Value callObjCSelector(Runtime& runtime, #if defined(__x86_64__) bool isStret = signature->returnType.ffiType->size > 16 && signature->returnType.ffiType->type == FFI_TYPE_STRUCT; - void* target = dispatchSuperClass != Nil + void (*target)(void) = dispatchSuperClass != Nil ? (isStret ? FFI_FN(objc_msgSendSuper_stret) : FFI_FN(objc_msgSendSuper)) : (isStret ? FFI_FN(objc_msgSend_stret)