From 544cf5928047b0419033b0bc3b0a42abbdcd6bbc Mon Sep 17 00:00:00 2001 From: Joshua Suskalo Date: Thu, 27 Feb 2025 10:43:18 -0500 Subject: [PATCH] Revert "Fix issue with StaticVariable failing on pointer-carried types" This reverts commit c1fa08586a40d1b6a688a839da6491c468d76032. --- CHANGELOG.md | 3 --- src/clj/coffi/ffi.clj | 4 +--- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 076a58e..81f5d42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,9 +5,6 @@ All notable changes to this project will be documented in this file. This change ### Added - Support for named union members in c-layout (thanks to @jjttjj) -### Fixed -- Bug where `static-variable` with composite types with pointer primitive type carriers (e.g. c-string) would fail to deserialize - ## [1.0.486] - 2024-10-04 ### Fixed - Bug where one too many indirections is used when serializing/deserializing pointer types diff --git a/src/clj/coffi/ffi.clj b/src/clj/coffi/ffi.clj index 07c45da..6c174af 100644 --- a/src/clj/coffi/ffi.clj +++ b/src/clj/coffi/ffi.clj @@ -630,9 +630,7 @@ (deftype StaticVariable [seg type meta] IDeref (deref [_] - (if (identical? ::mem/pointer (mem/primitive-type type)) - (mem/deserialize* seg type) - (mem/deserialize-from seg type))) + (mem/deserialize-from seg type)) IObj (withMeta [_ meta-map]