Fix bug relying on old behavior of c-layout for serialize-into

This commit is contained in:
Joshua Suskalo 2021-09-16 16:01:33 -05:00
parent fb6dfe69d2
commit 1c5fbff3dd

View file

@ -265,12 +265,11 @@
(defmethod serialize-into :default (defmethod serialize-into :default
[obj type segment scope] [obj type segment scope]
(let [new-type (c-layout type)] (if-some [prim-layout (primitive-type type)]
(if (qualified-keyword? new-type) (serialize-into (serialize* obj type scope) prim-layout segment scope)
(serialize-into (serialize* obj type scope) new-type segment scope) (throw (ex-info "Attempted to serialize an object to a type that has not been overriden."
(throw (ex-info "Attempted to serialize an object to a type that has not been overriden." {:type type
{:type type :object obj}))))
:object obj})))))
(defmethod serialize-into ::byte (defmethod serialize-into ::byte
[obj _type segment _scope] [obj _type segment _scope]