diff options
author | Nathan Angelacos <nangel@alpinelinux.org> | 2016-04-29 01:50:34 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2016-05-02 17:30:27 +0000 |
commit | b083df45bc139ba58d6d6015ae070040d2934c62 (patch) | |
tree | ec6760287afb463816bb5f7bc4b588bb9b76ba68 /community/lua-hiredis/0003-lua-5-2-compatbility.patch | |
parent | 4bf97c41ecf5391ad046883164979e2ff7fee447 (diff) | |
download | aports-b083df45bc139ba58d6d6015ae070040d2934c62.tar.bz2 aports-b083df45bc139ba58d6d6015ae070040d2934c62.tar.xz |
community/lua-hiredis
Make sure libhiredis is liked to the module
Apply various codefixes from github to bring
code base to e6355d4 (Mar 24 2014)
Apply https://github.com/agladysh/lua-hiredis/pull/6
Diffstat (limited to 'community/lua-hiredis/0003-lua-5-2-compatbility.patch')
-rw-r--r-- | community/lua-hiredis/0003-lua-5-2-compatbility.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/community/lua-hiredis/0003-lua-5-2-compatbility.patch b/community/lua-hiredis/0003-lua-5-2-compatbility.patch new file mode 100644 index 0000000000..8ca7458d00 --- /dev/null +++ b/community/lua-hiredis/0003-lua-5-2-compatbility.patch @@ -0,0 +1,36 @@ +diff --git a/AUTHORS b/AUTHORS +index bd5ee8a..f10d214 100644 +--- a/AUTHORS ++++ b/AUTHORS +@@ -8,3 +8,4 @@ lua-hiredis bindings contributors: + + Stein Ivar Berghei <stein-ivar@berghei.no> + Peter Melnichenko <petjamelnik@yandex.ru> ++Andey Kunitsyn <blackicebox@gmail.com> +diff --git a/src/lua-hiredis.c b/src/lua-hiredis.c +index 3dfafc1..079cbd9 100644 +--- a/src/lua-hiredis.c ++++ b/src/lua-hiredis.c +@@ -34,6 +34,22 @@ extern "C" { + + #define LUAHIREDIS_KEY_NIL "NIL" + ++#if LUA_VERSION_NUM >= 502 ++static void luaL_register(lua_State * L, const char * name, const luaL_Reg * l) ++{ ++ if (name) ++ { ++ lua_newtable(L); ++ luaL_setfuncs(L, l, 0); ++ lua_pushvalue(L,-1); ++ lua_setglobal(L,name); ++ } else ++ { ++ luaL_setfuncs(L,l,0); ++ } ++} ++#endif ++ + typedef struct luahiredis_Enum + { + const char * name; |