[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: toLua 4.0a improvements
- From: "Eric Ries" <eries@...>
- Date: Fri, 27 Apr 2001 13:33:04 -0400
Agreed, although it depends on what you count as bugs. toLua is very
amenable to workaroudns :) Mainly I have found workarounds for most of my
issues by having perl modify the package file and/or perform various
search/replaces on toLua's output.
Because I am working with a very large project (literally thousands of
header files), I can't afford to maintain individual package files :)
Here are a few examples:
1. toLua misinterprets char const * but handles const char * correctly
2. toLua cannot handle unions within structs, but works fine if you remove
the union keyword and associated braces
3. toLua cannot handle regular unions, so they have to be removed, etc.
1. toLua doesn't convert enumerated types correctly (although this is not
really toLua's fault, since it doesn't deal with enumerated types
explicitly), so we have to cast them to int first.
2. MS VC++ doesn't like the way toLua handles bool values, so have to change
foo = (bool) (tolua_getbool(..));
foo = (tolua_getbool(..) != 0);
I also use the perl script to manage all the tolua_X_open/close functions,
so that they are called (in the right order) automatically at runtime.
> -----Original Message-----
> From: email@example.com
> [mailto:firstname.lastname@example.org]On Behalf Of Nick Trout
> Sent: Friday, April 27, 2001 1:11 PM
> To: Multiple recipients of list
> Subject: Re: toLua 4.0a improvements
> >>Does anybody know what the current state of toLua development is? I've
> several bugs but have found it more convenient to implement fixes in perl
> than in Lua, and so have created a perl frontend that adds some
> features to
> toLua and corrects a few bugs.
> For those that are interested, this tool parses .h and .cpp files
> produces a temporarr toLua "package" file, runs toLua on that
> file, and then
> (optionally) deletes the intermediate file. If anyone is interested in
> seeing/using this tool, let me know.
> I've got one written in Python if anyone would like that :-D Its scans
> headers, "cleans" your classes and writes a pkg file. But, too be honest I
> found its just as quick to maintain the pkg file yourself and then you can
> implement any workarounds easier (eg. enums in classes, renaming etc)
> Are you sure you've found bugs in toLua? Usually you just have to
> find a way
> to work round something. What problems have you had?