[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua/C: How do you ...
- From: Adrian Perez de Castro <moebius.lists@...>
- Date: Sun, 09 Nov 2008 19:28:57 +0100
Excerpts from Javier Guerra Giraldez's message of Sat Nov 08 22:42:09 +0100 2008:
> i prefer to do it by hand. The C API is very simple; but it can be tedious
> if you want to bind a big library.
The same goes for me, but I also add a fair amount of preprocessor macro
hackery in order to avoid writing the same code again and again. Also,
sometimes I use AWK or Lua scripts to autogenerate some code. The code
depends on the particular binding, so I have no general rules. I must also
admit that some code looks like serious CPP-abuse, so make sure you add
comments to your macros to ease maintainability ;-)
Adrian Perez <firstname.lastname@example.org>