[vlc-devel] [PATCH 4/4] lua: use the proper prototype for Lua C callbacks

Rémi Denis-Courmont remi at remlab.net
Mon Mar 2 13:16:14 CET 2020


Series LGTM

Le 2 mars 2020 13:10:51 GMT+02:00, Steve Lhomme <robux4 at ycbcr.xyz> a écrit :
>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
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20200302/6b798db0/attachment.html>


More information about the vlc-devel mailing list