[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Low memory lua parsing
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Fri, 9 Mar 2012 16:37:27 -0300
> I have some large lua files. I notice I could use lauxlib.h and call luaL_loadstring, but that looks like it will use about as much memory as the size of the lua file, which is undesirable. I don't need the output, I only need to check that it's valid lua.
Use luaL_loadfile and check its return code. Pop the result from the stack
and the generated code will be collected eventually. But, no, there is no
way to parse a Lua script without generating code.