[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Executing a script multiple times
- From: "Juan Manuel Alvarez" <naicigam@...>
- Date: Mon, 29 Sep 2008 13:57:57 -0300
Hi everyone! I am new to LUA and I have a little question.
I am trying to execute a script multiple times.
I first called luaL_loadbuffer one time and lua_pcall two times. The
second time calling lua_pcall I received an error message. I start
looking and I found something in the documentation about pcall: "Then
the program calls lua_pcall, which pops the chunk from the stack and
runs it in protected mode", so I finally discovered what my error was
Now I have some questions: How much does luaL_loadbuffer affect
performance? Is there any way to precompile a script from the C API
and call it multiple times? (since I only found a way to precompile it
Thanks in advance!