29 Sep 18:57
Executing a script multiple times
From: Juan Manuel Alvarez <naicigam <at> gmail.com>
Subject: Executing a script multiple times
Newsgroups: gmane.comp.lang.lua.general
Date: 2008-09-29 16:57:57 GMT
Subject: Executing a script multiple times
Newsgroups: gmane.comp.lang.lua.general
Date: 2008-09-29 16:57:57 GMT
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 =o) 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 from command-line). Thanks in advance! Juan M.
RSS Feed