diff options
author | Matteo Bernardini <ponce@slackbuilds.org> | 2014-03-19 07:17:41 +0700 |
---|---|---|
committer | Erik Hanson <erik@slackbuilds.org> | 2014-03-21 13:01:20 -0500 |
commit | 6d5d8cbfac9e60d682a847e0c58636b24293cffb (patch) | |
tree | 8b8c55a23817b7a5aa53e6148509ea060c9d0510 /libraries/lua-md5/d6719be.patch | |
parent | cf8cc4ba89d05f3daa5f634c635c0ce4c2b4c641 (diff) | |
download | slackbuilds-6d5d8cbfac9e60d682a847e0c58636b24293cffb.tar.gz |
libraries/lua-md5: Added (Cryptographic Library for Lua).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries/lua-md5/d6719be.patch')
-rw-r--r-- | libraries/lua-md5/d6719be.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/libraries/lua-md5/d6719be.patch b/libraries/lua-md5/d6719be.patch new file mode 100644 index 0000000000..cc0f92bf4f --- /dev/null +++ b/libraries/lua-md5/d6719be.patch @@ -0,0 +1,28 @@ +commit d6719be4d52ca06e29bc5dd92c98fd03538ecec9 +Author: Tomas Guisasola <tomasguisasola@gmail.com> +Date: Sat Sep 21 11:28:50 2013 -0300 + + Bug correction: the function didn't work with upvalues (thanks to Philipp Janda). + +diff --git a/src/compat-5.2.c b/src/compat-5.2.c +index 1a60973..f54caa2 100644 +--- a/src/compat-5.2.c ++++ b/src/compat-5.2.c +@@ -7,14 +7,14 @@ + ** Adapted from Lua 5.2.0 + */ + void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) { +- luaL_checkstack(L, nup, "too many upvalues"); ++ luaL_checkstack(L, nup+1, "too many upvalues"); + for (; l->name != NULL; l++) { /* fill the table with given functions */ + int i; ++ lua_pushstring(L, l->name); + for (i = 0; i < nup; i++) /* copy upvalues to the top */ + lua_pushvalue(L, -nup); +- lua_pushstring(L, l->name); + lua_pushcclosure(L, l->func, nup); /* closure with those upvalues */ +- lua_settable(L, -(nup + 3)); ++ lua_settable(L, -3); + } + lua_pop(L, nup); /* remove upvalues */ + } |