From 3043bf787706162cf273a8dee5d80dbaeb4c445c Mon Sep 17 00:00:00 2001 From: Joshua Suskalo Date: Thu, 30 Sep 2021 15:25:21 -0500 Subject: [PATCH] Fix upcall stubs having incorrect type descriptors --- CHANGELOG.md | 5 +++++ src/clj/coffi/ffi.clj | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0df9aaa..b7dab6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Change Log All notable changes to this project will be documented in this file. This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/). +## [Unreleased] +### Fixed +- Upcall stubs had incorrect types + ## [0.1.176] - 2021-09-29 ### Fixed - Usage of `defcfn` without a docstring produced an invalid `def` form @@ -15,5 +19,6 @@ All notable changes to this project will be documented in this file. This change - Support for serializing and deserializing arbitrary Clojure functions - Support for serializing and deserializing arbitrary Clojure data structures +[Unreleased]: https://github.com/IGJoshua/coffi/compare/v0.1.176...HEAD [0.1.176]: https://github.com/IGJoshua/coffi/compare/v0.1.169...v0.1.176 [0.1.169]: https://github.com/IGJoshua/coffi/compare/16f56bc31d69142ec4d2fb61b15b069d78b127ca...v0.1.169 diff --git a/src/clj/coffi/ffi.clj b/src/clj/coffi/ffi.clj index 4c966e6..ec04dce 100644 --- a/src/clj/coffi/ffi.clj +++ b/src/clj/coffi/ffi.clj @@ -314,8 +314,8 @@ [:return]]} {:name :upcall :flags #{:public} - :desc (conj (mapv mem/java-layout arg-types) - (mem/java-layout ret-type)) + :desc (conj (mapv insn-layout arg-types) + (insn-layout ret-type)) :emit [[:aload 0] [:getfield :this "upcall_ifn" IFn] (map-indexed