[vlc-commits] lua: use lua_set_funcs to replace luaL_register in 5.3

Jean-Baptiste Kempf git at videolan.org
Wed Mar 16 16:51:49 CET 2016


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Mar 16 16:50:41 2016 +0100| [0baa8d54ab16ac2a37db201bfe4f0bcf300dca42] | committer: Jean-Baptiste Kempf

lua: use lua_set_funcs to replace luaL_register in 5.3

Ref #14695

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0baa8d54ab16ac2a37db201bfe4f0bcf300dca42
---

 modules/lua/vlc.h |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/modules/lua/vlc.h b/modules/lua/vlc.h
index c68f832..1fa78fd 100644
--- a/modules/lua/vlc.h
+++ b/modules/lua/vlc.h
@@ -50,6 +50,12 @@
 # define lua_strlen(L,idx)         lua_rawlen(L,idx)
 #endif
 
+#if LUA_VERSION_NUM >= 503
+# undef luaL_register
+# define luaL_register(L, n, l) luaL_setfuncs(L, (l), 0)
+#endif
+
+
 /*****************************************************************************
  * Module entry points
  *****************************************************************************/



More information about the vlc-commits mailing list