Fri Nov 23 13:59:03 EST 2012


The thing to go for is this[1]: "the parse tree can be exported as XML
and Lisp s-expressions."

So, let's do that.  Take the zl lib and export it as s-expressions.

Step 1: generate a Lua wrapper for zl

swig -lua v4l.h 

Step 2: s-expression

swig -sexp v4l.h

Hmm.. that seems all a bit complex.  What does it look like on the Lua
side I wonder?

Hmm... looks like today is not the day.  A better way to go is
probably first to make this work for a toy problem without all the
linker madness.

Alternatively, it might be a lot easier to write "wrappable" code in
the first place.  Many features of swig I really don't need, such as
structure member representation.  I'm happy with just functions and
size of data objects to allow for caller-side allocation.

There has to be a simpler way to get to this..

[1] http://www.swig.org/compare.html
[2] http://www.swig.org/tutorial.html