Re: Pika-style from first principles Michael Sperber 06 Jan 2004 20:00 UTC

>>>>> "Marc" == Marc Feeley <xxxxxx@IRO.UMontreal.CA> writes:

Marc> To avoid the tedium of writing by hand the associated Scheme-to-C and
Marc> C-to-Scheme conversion functions (i.e. "FILENAME_FROM_SCHEME" and
Marc> "FILENAME_TO_SCHEME", "STREAM_FROM_SCHEME", ...), a way to define type
Marc> aliases on the C side of the FFI is useful so that one can write in a
Marc> C header file something like:

Marc> /* file: "my_types.h" */
Marc> #include "basic_types.h"
Marc> #ifdef UNICODE
Marc> #define FILENAME NONNULL_UCS2STAR
Marc> #define FILENAME_FROM_SCHEME NONNULL_UCS2STAR_FROM_SCHEME
Marc> #define FILENAME_TO_SCHEME NONNULL_UCS2STAR_TO_SCHEME
Marc> #else
Marc> #define FILENAME NONNULL_CHARSTAR
Marc> #define FILENAME_FROM_SCHEME NONNULL_CHARSTAR_FROM_SCHEME
Marc> #define FILENAME_TO_SCHEME NONNULL_CHARSTAR_TO_SCHEME
Marc> #endif

I think I'm missing a crucial bit here: Where do
NONNULL_UCS2STAR_FROM_SCHEME, NONNULL_UCS2STAR_TO_SCHEME and
associates come from?  What's "a way to define type aliases on the C
side of the FFI"?

--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla