[C2hs] Re: Wish list

Achim Schneider barsoap at web.de
Sun Jan 25 21:18:27 EST 2009


Achim Schneider <barsoap at web.de> wrote:

> - {#fun [compile|ignore]#}: 
>   If a C function definition comes with a block instead of a
> semicolon, emit an error and demand to know whether 
>   a) the header is confused and default behaviour is desired (ignore)
>   b) a c file should be emitted that contains the code (compile)
>   This is very, very useful for headers that generate a lot of inline
>   functions that don't get compiled into some .o/.so
>   -- This will be done before the first release of complete agar
>      bindings, as I can't be arsed to do it manually and rather hack
>      c2hs than an ad-hoc grep on steroids. I don't know when (if ever)
>      that'll be, though.
> 
gcc -E -c agar-glue.h `agar-config --cflags` | \
    sed -e "s/^static//" > agar-stuff.c

This is evil and possibly gives me more than I need, but it works.


-- 
(c) this sig last receiving data processing entity. Inspect headers
for copyright history. All rights reserved. Copying, hiring, renting,
performance and/or quoting of this signature prohibited.




More information about the C2hs mailing list