[vlc-commits] lua: wrap luaL_register since Lua 5.2
Alexandre Janniaux
git at videolan.org
Fri Dec 11 10:12:37 UTC 2020
vlc | branch: master | Alexandre Janniaux <ajanni at videolabs.io> | Mon Apr 6 15:56:02 2020 +0200| [616c92425ccf413db3767f2538a701212320c33d] | committer: Alexandre Janniaux
lua: wrap luaL_register since Lua 5.2
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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=616c92425ccf413db3767f2538a701212320c33d
---
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) \
More information about the vlc-commits
mailing list