[gambit-list] serializing instances of structures

Vijay Mathew vijay.the.lisper at gmail.com
Fri Jul 7 08:08:58 EDT 2017


I am running into an error with deserialized structure instances:

Gambit v4.8.4
> (define-structure color r g b)
> (define red (make-color 255 0 0))
> (color-r red)
255
> (define e (object->u8vector red))
> (define red2 (u8vector->object e))
> (color-r red2)
*** ERROR IN (console)@6.1 -- (Argument 1) Instance of #<type #2 color>
expected
(color-r '#<color #3 r: 255 g: 0 b: 0>)

How can I reliably decode a struct-object?

--Vijay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20170707/a52c4cd4/attachment.htm>


More information about the Gambit-list mailing list