diff util-src/hashes.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
parents fc6213104d78
children dbe9781fd278
line wrap: on
line diff
--- a/util-src/hashes.c	Sat Jul 02 17:30:06 2022 +0200
+++ b/util-src/hashes.c	Fri Jul 01 21:21:21 2022 +0200
@@ -30,9 +30,6 @@
 #include <openssl/evp.h>
 #include <openssl/err.h>
 
-#if (LUA_VERSION_NUM == 501)
-#define luaL_setfuncs(L, R, N) luaL_register(L, NULL, R)
-#endif
 
 static const char *hex_tab = "0123456789abcdef";
 static void toHex(const unsigned char *in, int length, unsigned char *out) {
@@ -258,9 +255,7 @@
 };
 
 LUALIB_API int luaopen_util_hashes(lua_State *L) {
-#if (LUA_VERSION_NUM > 501)
 	luaL_checkversion(L);
-#endif
 	lua_newtable(L);
 	luaL_setfuncs(L, Reg, 0);
 	lua_pushliteral(L, "-3.14");