|
From: | Zbigniew |
Subject: | Re: [Chicken-users] noobie question about chicken/swig/csi |
Date: | Tue, 3 Apr 2007 14:36:31 -0500 |
Hi. Only the basic #> ... <# (or foreign-declare) is built into Chicken; all this does is include the contents directly into the generated C file. If you use this method, you still have to write a foreign-lambda so Scheme can see it. If you want Chicken to do this for you, you can use #>? .. <# (foreign-parse) or #>! ... <# (foreign-parse/declare). The former does not insert the code, it just parses it and generates bindings in Scheme. The latter actually inserts it so you can write inline C programs. foreign-parse and foreign-parse/declare used to be built into Chicken, but were split off into the easyffi egg in preparation for 2.5. So it is as official as it gets. You can do everything you need with foreign-lambda or foreign-primitive, but it is often more convenient to use the easyffi wrapper. And that's all easyffi is, an incredibly convenient wrapper. On 4/3/07, Tato Norren <address@hidden> wrote:
On Mon, 2 Apr 2007 11:00:47 +0200, "minh thu" <address@hidden> said: > 2007/4/2, minh thu <address@hidden>: Question about the #> ... <# notation though. It seems that this shorthand for foreign-declare is built into the main chicken distribution as well as into the easyffi egg. Is easyffi the 'official' ffi to use?
[Prev in Thread] | Current Thread | [Next in Thread] |