|
m_pLUAState = lua_open();
then i initialize other things needed and register with Lua the C++ functions that i want to export to my scripts:
lua_register(LUAPtr, FuncNAme, FuncPtr);
then i simply call a script file, which is a simple local text file, using:
lua_dofile(m_pLUAState, Filename );
now what i think happens is that each time lua_dofile is called internally lua opens the file, loads it, parses it etc etc. and then closes it upon returning.
the question that i had (if the assumption above is correct, plz verify this) is since lua already opened and loaded a file once it should not do this again if the same script was called.
is there a way to manage this in a simple and efficient manner? or prefably if lua could do this on its own end.
thanks in advance,
sohyl.
P.S. comments wuold be really helpful if you suggest some code.
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.