[vlc-devel] [PATCH v2 1/6] lua: wrap luaL_register since Lua 5.2

Alexandre Janniaux ajanni at videolabs.io
Sat Nov 14 16:29:59 CET 2020


luaL_setfuncs exists since lua5.2 and luaL_register was already
deprecated at that version. Using the luaL_register since Lua 5.2
prevents using the deprecated function but mostly also enforce the
future state of the code to be used on more platforms.
---
 modules/lua/vlc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/lua/vlc.h b/modules/lua/vlc.h
index 36bcc25aad..e6dea213d1 100644
--- a/modules/lua/vlc.h
+++ b/modules/lua/vlc.h
@@ -48,7 +48,7 @@
 # define lua_strlen(L,idx)         lua_rawlen(L,idx)
 #endif
 
-#if LUA_VERSION_NUM >= 503
+#if LUA_VERSION_NUM >= 502
 # undef luaL_register
 # define luaL_register(L, n, l) luaL_setfuncs(L, (l), 0)
 # define luaL_register_namespace(L, n, l) \
-- 
2.29.2



More information about the vlc-devel mailing list