From: Francesco M. <f18...@ya...> - 2006-03-29 19:28:57
|
Hi, John Labenski ha scritto: > I came across what seemed to be a bug in the garbage collector in > 5.0.2. In the printing sample "virtual" functions are set for the > wxLuaPrintout which get called instead of the c++ functions. However > in the print preview if you changed the size of the preview a few > times the functions you set (even if global, not local) would get > garbage collected. weird... > Anyway, this prompted to me try 5.1 and so far the results are very > good, this bug was fixed and it's MUCH FASTER! (yes using capitals is > appropriate, it's pretty impressive) very good news ! > It compiles and runs using the "Makefiles" in the src dir of the > apps/XXX dirs. All the samples have been updated, but not thoroughly > tested. I've updated bakefiles but now, when I try to run wxluaedit I get a segmentation fault... (this with wx2.6.3 and with an up2date wxStedit...); other apps and samples I've tried work fine. > ------------------------- > > Some notes on the changes for 5.1 that I've come across, there's more... > > 1) lua 5.1 does not have an "include" dir so I faked it by copying the > pertinent headers that we use into it. if you want to keep the header files in lua/src/ folder it's fine for me as it's not a problem for bakefiles ;) > 2) All the sources are in lua/src, even the lua and luac programs. > Please see modules/luaINSTALL for the list of files for each. > (Francesco, could you update the bakefiles? I don't think your *.c > trick will work anymore) I've updated the bakefiles using the list of source files provided in lua/INSTALL... Francesco > 3) DO NOT CALL luaopen_XXX (eg luaopen_io for the io.XXX table). IT > WILL CRASH after some invalid reads. You have to open the libs a > little differently, I'm just using the function "luaL_openlibs" in > lua/src/linit.c which loads them all, but shows you how to do it > individually. > > 4) "for k, v in sometable do" is now "for k, v in pairs(sometable) do" > > 5) table.getn and table.setn are gone, use the #sometable to get the > count of the consecutive integer indexes in a table. > > 6) math.mod -> math.fmod and string.gfind -> string.gmatch > > etc, see bottom of > http://www.lua.org/manual/5.1/manual.html > > Regards, > John Labenski > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=k&kid0944&bid$1720&dat1642 |