Fix issue with StaticVariable failing on pointer-carried types

This commit is contained in:
Joshua Suskalo 2025-02-26 14:49:32 -05:00
parent 167d3e0d9b
commit c1fa08586a
No known key found for this signature in database
GPG key ID: 9B6BA586EFF1B9F0
2 changed files with 6 additions and 1 deletions

View file

@ -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

View file

@ -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]