From 50cc6f3bdc2bce77417f3608d96d84b40206061d Mon Sep 17 00:00:00 2001 From: Joshua Suskalo Date: Thu, 30 Sep 2021 15:25:58 -0500 Subject: [PATCH] Fix upcall stubs not compiling with non-primitive argument types --- CHANGELOG.md | 1 + src/clj/coffi/ffi.clj | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b7dab6e..462474b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file. This change ## [Unreleased] ### Fixed +- Upcall stubs with non-primitive arguments failed to compile - Upcall stubs had incorrect types ## [0.1.176] - 2021-09-29 diff --git a/src/clj/coffi/ffi.clj b/src/clj/coffi/ffi.clj index ec04dce..ed93bfc 100644 --- a/src/clj/coffi/ffi.clj +++ b/src/clj/coffi/ffi.clj @@ -320,7 +320,7 @@ [:getfield :this "upcall_ifn" IFn] (map-indexed (fn [idx arg] - [[(load-instructions arg) (inc idx)] + [[(load-instructions arg :aload) (inc idx)] (to-object-asm arg)]) arg-types) [:invokeinterface IFn "invoke" (repeat (inc (count arg-types)) Object)]