[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: tolua survey
- From: "Nick Trout" <ntrout@...>
- Date: Mon, 25 Nov 2002 18:24:58 -0800
> > > * How could tolua be improved?
> > Tolua should try to be smarter at understanding
> > C and C++ header files. Ideally, tolua should be
> > able to parse any valid .h file without us having
> > to edit it manually. Making a .pkg file for a large
> > library still requires a lot of manual work, and
> > I expect an automation tool to reduce that work
> > as much as possible. Yeah, I know I'm asking a
> > lot, but...
Tolua can't make up its mind what you want to expose to the script
though. I think you can already put (something like)
// TOLUA on
... expose this bit ...
// TOLUA off
in your code, so you can do this in header files already. Personally I
think your code just ends up looking a mess though. Downside is you have
to go to 2 different files when the interface changes but its not
exactly a major overhead. I suppose you could put something like #if 0
// TOLUA on ... #endif in the same header - I've seen this with a fair
amount of SWIG code.
If you're binding to 3rd party code you end up commenting out lots of
stuff or altering the syntax until it works (eg. glColor3f @ glColor) so
its not practical to comment or reuse the header.
The other issue is dependencies, you don't want to end up touching a
header file repeatedly and recompiling all dependent files when it's the
binding you're altering, not the interface client implementation.