From 25a11d4ba0eb8d3bd89691b307ea07be1e523afe Mon Sep 17 00:00:00 2001 From: Joshua Suskalo Date: Mon, 20 Sep 2021 15:23:05 -0500 Subject: [PATCH] Deserialize unions by giving a slice of their segment --- src/coffi/ffi.clj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/coffi/ffi.clj b/src/coffi/ffi.clj index c9808c8..60ad392 100644 --- a/src/coffi/ffi.clj +++ b/src/coffi/ffi.clj @@ -487,6 +487,10 @@ segment scope))) +(defmethod deserialize-from ::union + [segment type] + (slice segment 0 (size-of type))) + ;;; FFI Code loading and function access (defn load-system-library