Re: FFI and C macros

Jens Axel Søgaard <[email protected]>
Newsgroups gmane.comp.lang.racket.user,gmane.lisp.scheme.plt
Message-ID <CABefVgwqF-b7-gUjGMjMUQefXW3Y7yzQDpWPsj9KN2yDQBkPmw@mail.gmail.com>
Is https://docs.racket-lang.org/gir/index.html  of any use in your context?

/Jens Axel

2016-10-24 23:13 GMT+02:00 James James <[email protected]>:

> 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.
>



-- 
-- 
Jens Axel Søgaard

-- 
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.