Skip to content
Snippets Groups Projects
Commit fd9f89fd authored by Konstantin Shulgin's avatar Konstantin Shulgin
Browse files

bug977898:

tarantool_lua_dofile function was rewritten.
parent 49de2884
No related branches found
No related tags found
No related merge requests found
......@@ -953,18 +953,9 @@ tarantool_lua_dostring(struct lua_State *L, const char *str)
static int
tarantool_lua_dofile(struct lua_State *L, const char *filename)
{
if (luaL_loadfile(L, filename) != 0) {
return 1;
}
@try {
lua_call(L, 0, LUA_MULTRET);
} @catch (ClientError *e) {
lua_pushstring(L, e->errmsg);
return 1;
}
return 0;
lua_getglobal(L, "dofile");
lua_pushstring(L, filename);
return lua_pcall(L, 1, 1, 0);
}
void
......@@ -1077,7 +1068,7 @@ load_init_script(void *L_ptr)
/* execute start-up file */
if (tarantool_lua_dofile(L, TARANTOOL_LUA_INIT_SCRIPT))
panic("start-up: %s", lua_tostring(L, -1));
panic("%s", lua_tostring(L, -1));
}
void tarantool_lua_load_init_script(struct lua_State *L)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment