From 346304da786a652f25f73ee80957ec6fd16716c8 Mon Sep 17 00:00:00 2001 From: Alex Pickering Date: Sun, 12 Sep 2021 16:58:26 -0500 Subject: Line endings to unix Convert all line endings to unix line endings. --- src/lua-nng-common.h | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'src/lua-nng-common.h') diff --git a/src/lua-nng-common.h b/src/lua-nng-common.h index a56dd8a..ffdc4c7 100644 --- a/src/lua-nng-common.h +++ b/src/lua-nng-common.h @@ -1,6 +1,16 @@ -#include -#include -#include - -// lua runtime's traceback function -int traceback (lua_State *L); +#include +#include +#include + +/* +Lua version independence 5.1+ +*/ +#ifndef luaL_newlib + #define luaL_newlib(l,r) luaL_register(l,NULL,r) +#endif +#ifndef luaL_setmetatable + #define luaL_setmetatable(l,s) luaL_getmetatable(l,s); lua_setmetatable(l,-2); +#endif + +// lua runtime's traceback function +int traceback (lua_State *L); -- cgit v1.2.3-70-g09d2