[Top][All Lists]

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

[Chicken-users] foreign-lambda*

From: Nicolas Pelletier
Subject: [Chicken-users] foreign-lambda*
Date: 02 Feb 2005 10:33:45 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3


I often want to generate some C code as a string somewhere in a Scheme
file and then call it dynamically. However, foreign-lambda* insists on
having a string as its last  parameter, so that the following does not

(let* ([v (make-byte-vector 37 0)]
       [s "some_random_call (C_data_pointer (x), 37);"]
       [f (foreign-lambda* void ((scheme-object o)) s)])
   (f v))

The construction  of the string of  C code is  usually more convoluted
than this. The above just shows the pattern.

How can I achieve the effect I am looking for ?

Thanks in advance for your help.


reply via email to

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