diff --git a/CHANGELOG.md b/CHANGELOG.md index 81f5d42..076a58e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ 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 6c174af..07c45da 100644 --- a/src/clj/coffi/ffi.clj +++ b/src/clj/coffi/ffi.clj @@ -630,7 +630,9 @@ (deftype StaticVariable [seg type meta] IDeref (deref [_] - (mem/deserialize-from seg type)) + (if (identical? ::mem/pointer (mem/primitive-type type)) + (mem/deserialize* seg type) + (mem/deserialize-from seg type))) IObj (withMeta [_ meta-map]