Fix bug relying on old behavior of c-layout for serialize-into
This commit is contained in:
parent
fb6dfe69d2
commit
1c5fbff3dd
1 changed files with 5 additions and 6 deletions
|
|
@ -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]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue