Reorder object and type in serialize for -> compat

This commit is contained in:
Joshua Suskalo 2021-09-15 12:15:33 -05:00
parent 138786b69e
commit 0622f9248c

View file

@ -21,7 +21,7 @@
`scope`, except in extenuating circumstances." `scope`, except in extenuating circumstances."
(fn (fn
#_{:clj-kondo/ignore [:unused-binding]} #_{:clj-kondo/ignore [:unused-binding]}
[type obj segment scope] [obj type segment scope]
type)) type))
(defmulti deserialize (defmulti deserialize
@ -107,8 +107,8 @@
(defn serialize (defn serialize
"Serializes the `obj` into a newly-allocated [[MemorySegment]]." "Serializes the `obj` into a newly-allocated [[MemorySegment]]."
([type obj] (serialize type obj (ResourceScope/newImplicitScope))) ([obj type] (serialize obj type (ResourceScope/newImplicitScope)))
([type obj scope] (serialize* type obj (alloc-instance type scope) scope))) ([obj type scope] (serialize* obj type (alloc-instance type scope) scope)))
(comment (comment
;;; Prospective syntax for ffi ;;; Prospective syntax for ffi