summaryrefslogtreecommitdiff
blob: 0e3c7cfce3dacd6d623e857ac4af6e671cff1bd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--- a/lua-udev.c	2018-09-25 18:34:57.043484722 +0700
+++ b/lua-udev.c	2018-09-25 18:38:32.437294642 +0700
@@ -584,10 +584,9 @@ static luaL_Reg udev_methods[] = {
 
 };
 
-#if LUA_VERSION_NUM < 503
+#ifndef luaL_newlib
 #define luaL_newlib(L, methods)\
-    lua_createtable(L, 0, sizeof(methods) / sizeof(luaL_Reg) - 1);\
+    lua_createtable(L, 0, sizeof(methods) / sizeof(luaL_Reg) - 1);
-    luaL_register(L, NULL, methods);
 #endif
 
 #define lua_pushcfunctionfield(field, method)\