chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] object-evict, string ports, safe-foreign-wrapper, f


From: Thomas Christian Chust
Subject: Re: [Chicken-users] object-evict, string ports, safe-foreign-wrapper, foreign-primitive, Cheney on the Victoria Line, etc (was: What happens to a (non-simple) Scheme object sent to a foreign function?)
Date: Mon, 05 Feb 2007 11:34:28 +0100
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.2pre) Gecko/20070111 SeaMonkey/1.1

Tony Sidaway wrote:

> [...]
> My current thought is this:  In step 1, I pass the library a key (in
> static memory, not heap) which I associate with the port (I place the
> actual port in a srfi-69 hash table under that key).  On receiving the
> key, in stage 2, my write procedure (which would ideally be written in
> Chicken as a safe-foreign-wrapper procedure) would pick the port out
> of the hash table using that key, and write the string using a method
> compatible with Chicken's port mechanism.
> [...]

Hello,

for a similar technique of callback management you may want to have a
look at the implementation of the SQLite3 egg, which allows you to
define arbitrary new SQL functions in Scheme using
sqlite3:define-function and associates...

cu,
Thomas





reply via email to

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