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

Re: Pika-style from first principles

This page is part of the web mail archives of SRFI 50 from before July 7th, 2015. The new archives for SRFI 50 contain all messages, not just those from before July 7th, 2015.



>>>>> "Marc" == Marc Feeley <feeley@xxxxxxxxxxxxxxxx> 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