[gambit-list] c-struct
Adrien Pierard
pierarda at iro.umontreal.ca
Wed May 23 12:06:03 EDT 2007
On Wed, May 23, 2007 at 10:29:11PM +0800, TJ wrote :
> On 5/23/07, Eduardo Cavazos <wayo.cavazos at gmail.com> wrote:
> > Do I stick (include "~~/syntax-case") in "c-struct.scm"?
>
> IIRC, you have to put (load "~~/syntax-case.scm") in your Gambit
> initialization file. Search the Gambit manual for "gambcini".
What I usually do is have c-struct.scm like
----snip----
(include "~~/syntax-case.scm") ;; includes the syntax-rules
(include "c-struct-defs.scm") ;; includes your syntaxes and so on
----snip----
If you put syntax-case un c-struct, you won't be able to compile it
as the syntaxes won't be transformed in c-struct (because of the order
in which files are parsed/compiled, as far as I remember).
Or search the gambcini, but I've never done it this way.
> > Finally, should I put (include "c-struct") in "Xlib.scm"?
> I don't know about this at all.
Maybe it could be put at a better place, such as in the FFI handling
files ? This macro can be quite useful indeed to access structures...
Adrien
--
"I am not a Church numeral; I am a free variable!"
(The Scheme Underground)
More information about the Gambit-list
mailing list