FFI and C macros

James James <[email protected]>
Newsgroups gmane.comp.lang.racket.user,gmane.lisp.scheme.plt
Message-ID <CAKseCmsVkVWsEfbxhjQyBtt6wjgy9VHKz0yi0bKwjqabxBWq1Q@mail.gmail.com>
I am trying to use the libnice C library by way of FFI but a lot of the
libnice example C code is using macros.

For example, G_OBJECT(). See:
https://developer.gnome.org/gobject/stable/gobject-The-Base-Object-Type.html#G-OBJECT:CAPS

It's used in Example 1 here:
https://nice.freedesktop.org/libnice/NiceAgent.html

So, in my Racket code, I suppose that I could manually rewrite things to
expand the macros or I could encapsulate the C code into functions (in C).
That way, the C preprocessor  can expand the macros first before FFI gets
them.  My question is whether there is an easier way than either of these
options.

James

-- 
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.