Software / code / prosody
Diff
util-src/struct.c @ 12575:1f6f05a98fcd
util-src: Remove Lua 5.1 compat macros
Part of #1600
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Fri, 01 Jul 2022 21:21:21 +0200 |
| parent | 12387:05c250fa335a |
| child | 12853:e1a71e83d430 |
line wrap: on
line diff
--- a/util-src/struct.c Sat Jul 02 17:30:06 2022 +0200 +++ b/util-src/struct.c Fri Jul 01 21:21:21 2022 +0200 @@ -36,12 +36,6 @@ #include "lauxlib.h" -#if (LUA_VERSION_NUM >= 502) - -#define luaL_register(L,n,f) luaL_newlib(L,f) - -#endif - /* basic integer type */ #if !defined(STRUCT_INT) @@ -392,7 +386,7 @@ LUALIB_API int luaopen_util_struct (lua_State *L); LUALIB_API int luaopen_util_struct (lua_State *L) { - luaL_register(L, "struct", thislib); + luaL_newlib(L, thislib); return 1; }