[vlc-commits] lua: use the proper prototype for Lua C callbacks

Steve Lhomme git at videolan.org
Mon Mar 2 14:19:24 CET 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Mar  2 12:10:23 2020 +0100| [48442d3536edae578f1a384e73346d1e2a4c0061] | committer: Steve Lhomme

lua: use the proper prototype for Lua C callbacks

The code fails to build with -Werror=incompatible-pointer-types otherwise

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

 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 d0b8a2e396..678ea826ce 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;



More information about the vlc-commits mailing list