[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Parsing file without execution
- From: "Joshua Jensen" <jjensen@...>
- Date: Sat, 29 Dec 2001 12:04:21 -0700
Hi!
I'd like to load a script file without executing it at the same time. In
lua_dobuffer(), the script is explicitely executed using lua_call():
LUA_API int lua_dobuffer (lua_State *L, const char *buff, size_t
size, const char *name) {
int status = parse_buffer(L, buff, size, name);
if (status == 0) /* parse OK? */
status = lua_call(L, 0, LUA_MULTRET); /* call main */
return status;
}
There seems to be no function like lua_parsefile() or lua_loadfile()
which I could use.
Do I have to add this function myself, or is there a way only load/parse
a file without modifying lua ?
-Markus-
----------------
There is in Lua 4.1.
Josh