diff options
Diffstat (limited to 'src/l_log.c')
-rw-r--r-- | src/l_log.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/l_log.c b/src/l_log.c index 8e95927..d1ab9c1 100644 --- a/src/l_log.c +++ b/src/l_log.c @@ -23,7 +23,8 @@ * along with anylike. If not, see <http://www.gnu.org/licenses/>. */ -#include <lua50/lua.h> +#include <lua5.1/lua.h> +#include <lua5.1/lauxlib.h> #include <stdlib.h> #include "log.h" @@ -92,7 +93,7 @@ static int l_log_print(lua_State *L) /* void log_print_hex_dump(log_prio_t prio, const u_int8_t* buf, u_int32_t len); */ -static const struct luaL_reg loglib [] = { +static const struct luaL_reg log_funcs [] = { { "init", l_log_init }, { "close", l_log_close }, { "add_target", l_log_add_target }, @@ -103,6 +104,6 @@ static const struct luaL_reg loglib [] = { LUALIB_API int luaopen_log(lua_State *L) { - luaL_openlib(L, "log", loglib, 0); + luaL_register(L, LUA_LOGLIBNAME, log_funcs); return 1; } |