[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: to serialize/deserialize closures; and multithreading

From: Paul Jarc
Subject: Re: to serialize/deserialize closures; and multithreading
Date: Thu, 25 Mar 2004 01:43:38 -0500
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux)

Nicholas Paul Johnson <address@hidden> wrote:
> 1. If I have a scheme value that is a closure, is there any way that I can
> serialize this closure (from C code) into a form that it can be
> deserialized back into a SCM closure variable (again, by C code)?

Well, there's (procedure-source foo), which gets you a list
(lambda ...) which can be passed to (write) and recovered with
(read).  But the closure may also have captured some lexical bindings,
which won't survive this translation.  (And of course, anything that
can be done from Scheme can also be done from C, though the details
may vary depending on the procedure/function in question.)

> Also, does anyone know of a good documentation of the SCM_ API?  I've not
> been able to find one.

Relative to the manual released with 1.6.4, there have been many
additions in CVS.  Some of the changes are due to code changes, but
I'd expect most of it would hold for 1.6 as well.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]