equal
deleted
inserted
replaced
1 #include "lua_config.h" |
1 #include "lua_config.h" |
2 |
2 |
3 #include <lua5.1/lauxlib.h> |
3 #include <lua5.1/lauxlib.h> |
4 |
4 |
5 err_t lua_config_load (struct nexus_lua *lua, const char *path, struct error_info *err) |
5 err_t lua_config_load (struct nexus_lua *lua, const char *path, error_t *err) |
6 { |
6 { |
7 // just use luaL_loadfile and translate the error code |
7 // just use luaL_loadfile and translate the error code |
8 if (nexus_lua_error(lua->st, luaL_loadfile(lua->st, path), err)) |
8 if (nexus_lua_error(lua->st, luaL_loadfile(lua->st, path), err)) |
9 // XXX: pollute the stack |
9 // XXX: pollute the stack |
10 return ERROR_CODE(err); |
10 return ERROR_CODE(err); |