[vlc-devel] [PATCH 4/4] lua: use the proper prototype for Lua C callbacks
Steve Lhomme
robux4 at ycbcr.xyz
Mon Mar 2 12:10:51 CET 2020
The code fails to build with -Werror=incompatible-pointer-types otherwise
---
modules/lua/libs/objects.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/modules/lua/libs/objects.c b/modules/lua/libs/objects.c
index d0b8a2e3967..678ea826ce6 100644
--- a/modules/lua/libs/objects.c
+++ b/modules/lua/libs/objects.c
@@ -107,21 +107,31 @@ static int vlclua_get_player( lua_State *L )
return 1;
}
+static void do_vout_Release( void *vout )
+{
+ vout_Release( vout );
+}
+
static int vlclua_get_vout( lua_State *L )
{
vout_thread_t *vout = vlclua_get_vout_internal(L);
if (vout)
- vlclua_push_vlc_object(L, vout, vout_Release);
+ vlclua_push_vlc_object(L, vout, do_vout_Release);
else
lua_pushnil(L);
return 1;
}
+static void do_aout_Release( void *aout )
+{
+ aout_Release( aout );
+}
+
static int vlclua_get_aout( lua_State *L )
{
audio_output_t *aout = vlclua_get_aout_internal(L);
if (aout)
- vlclua_push_vlc_object(L, aout, aout_Release);
+ vlclua_push_vlc_object(L, aout, do_aout_Release);
else
lua_pushnil(L);
return 1;
--
2.17.1
More information about the vlc-devel
mailing list