[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: foreign function interface
- To: email@example.com
- Subject: Re: foreign function interface
- From: haible (Bruno Haible)
- Date: Sat, 17 Jun 95 00:46:09 +0200
Dan Stanger <firstname.lastname@example.org> asks:
> is is possible to use the following construct?
> (defconstant _SYS_NMLN 32)
> (def-c-struct utsname
> (sysname (c-array char _SYS_NMLN))
Unfortunately this is not possible. You have to use #. :
(sysname (c-array char #._SYS_NMLN))
> also, is there a way to pass c code directly through the compilation process?
> via a special comment (for example)
No, an interface for doing that is missing. The only way to do that now
is to pack the C code into a separate C file which you then link against.
An unportable way of outputting C code directly (between functions) is
(format compiler::*coutput-stream* ...stuff...)