[vlc-devel] [PATCH] lua: Define LUA_COMPAT_APIINTCASTS for Lua >= 5.3.0 compatibility.

Vinson Lee vlee at freedesktop.org
Thu Feb 5 23:48:53 CET 2015


In Lua 5.3.0, luaL_checkint was deprecated.

This patch fixes this build error with Lua 5.3.0.

lua/demux.c: In function ‘vlclua_demux_peek’:
lua/demux.c:55:5: error: implicit declaration of function ‘luaL_checkint’ [-Werror=implicit-function-declaration]
     int n = luaL_checkint( L, 1 );
     ^

Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 modules/lua/vlc.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/lua/vlc.h b/modules/lua/vlc.h
index efd94f1..85c7fc1 100644
--- a/modules/lua/vlc.h
+++ b/modules/lua/vlc.h
@@ -38,6 +38,7 @@
 #include <vlc_stream.h>
 #include <vlc_demux.h>
 
+#define LUA_COMPAT_APIINTCASTS
 #define LUA_COMPAT_MODULE
 #include <lua.h>        /* Low level lua C API */
 #include <lauxlib.h>    /* Higher level C API */
-- 
2.2.2




More information about the vlc-devel mailing list