Module Name: src Committed By: sevan Date: Sun Apr 29 19:34:57 UTC 2018
Modified Files: src/crypto/external/bsd/netpgp/dist/bindings/lua: glue.c Log Message: Add support for Lua 5.3 To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/crypto/external/bsd/netpgp/dist/bindings/lua/glue.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/crypto/external/bsd/netpgp/dist/bindings/lua/glue.c diff -u src/crypto/external/bsd/netpgp/dist/bindings/lua/glue.c:1.4 src/crypto/external/bsd/netpgp/dist/bindings/lua/glue.c:1.5 --- src/crypto/external/bsd/netpgp/dist/bindings/lua/glue.c:1.4 Sun Apr 29 19:31:38 2018 +++ src/crypto/external/bsd/netpgp/dist/bindings/lua/glue.c Sun Apr 29 19:34:57 2018 @@ -334,7 +334,7 @@ l_getvar(lua_State *L) return 1; } -const struct luaL_reg libluanetpgp[] = { +const struct luaL_Reg libluanetpgp[] = { { "new", l_new }, { "init", l_init }, @@ -358,6 +358,10 @@ const struct luaL_reg libluanetpgp[] = { int luaopen_netpgp(lua_State *L) { - luaL_openlib(L, "netpgp", libluanetpgp, 0); +#if LUA_VERSION_NUM >= 502 + luaL_newlib(L, libluanetpgp); +#else + luaL_register(L, "netpgp", libluanetpgp); +#endif return 1; }