Add very inefficient raw types

This commit is contained in:
Joshua Suskalo 2022-07-16 19:37:46 -05:00
parent c9f30a361c
commit e1e64d8362
No known key found for this signature in database
GPG key ID: 9B6BA586EFF1B9F0

View file

@ -1118,6 +1118,20 @@
(with-acquired [(segment-scope segment)]
(map #(deserialize % type) (slice-segments segment (size-of type)))))
;;; Raw composite types
(defmethod c-layout ::raw
[[_raw type]]
(c-layout type))
(defmethod serialize-into ::raw
[obj _type segment _scope]
(copy-segment segment obj))
(defmethod deserialize-from ::raw
[segment _type]
(clone-segment segment))
;;; C String type
(defmethod primitive-type ::c-string