diff options
| author | sevan <sevan@NetBSD.org> | 2018-04-29 19:34:57 +0000 |
|---|---|---|
| committer | sevan <sevan@NetBSD.org> | 2018-04-29 19:34:57 +0000 |
| commit | be19ee2bcdb765b7ad0ef9f8a32ac050e2f2e834 (patch) | |
| tree | d7ac7e149f4f1373e342a7736115db921f46d4ed | |
| parent | eac4751550455b9616f27cd5a32ea8c9524d5308 (diff) | |
Add support for Lua 5.3
| -rw-r--r-- | crypto/external/bsd/netpgp/dist/bindings/lua/glue.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/crypto/external/bsd/netpgp/dist/bindings/lua/glue.c b/crypto/external/bsd/netpgp/dist/bindings/lua/glue.c index da6d5cc9bf0..68217131661 100644 --- a/crypto/external/bsd/netpgp/dist/bindings/lua/glue.c +++ b/crypto/external/bsd/netpgp/dist/bindings/lua/glue.c @@ -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; } |
