Sorry, here's a cleaned-up version:
(cffi:defctype uint8 :unsigned-char)
(cffi:defcstruct (anon-struct :size 16) (data (:array uint8 16) :offset 0))
(cffi:defctype guid (:struct anon-struct))
(cffi:convert-from-foreign (foreign-alloc 'guid) '(:struct anon-struct)) ;; => (DATA #(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
(cffi:convert-from-foreign (foreign-alloc 'guid) 'guid) ;; => #.(SB-SYS:INT-SAP #X7FC1E8001950)
Sorry, here's a cleaned-up version:
(cffi:defctype uint8 :unsigned-char)
(cffi:defcstruct (anon-struct :size 16)
(data (:array uint8 16) :offset 0))
(cffi:defctype guid (:struct anon-struct))
(cffi:convert- from-foreign
(foreign-alloc 'guid)
'(:struct anon-struct))
;; => (DATA #(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
(cffi:convert- from-foreign
(foreign-alloc 'guid)
'guid)
;; => #.(SB-SYS:INT-SAP #X7FC1E8001950)