terom@106: #include "lua_config.h" terom@106: terom@106: #include terom@106: terom@217: err_t lua_config_load (struct nexus_lua *lua, const char *path, error_t *err) terom@106: { terom@106: // just use luaL_loadfile and translate the error code terom@106: if (nexus_lua_error(lua->st, luaL_loadfile(lua->st, path), err)) terom@106: // XXX: pollute the stack terom@106: return ERROR_CODE(err); terom@106: terom@106: // execute it terom@106: // XXX; error handler with debug info terom@106: return nexus_lua_error(lua->st, lua_pcall(lua->st, 0, 0, 0), err); terom@106: } terom@106: