lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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-