[vlc-devel] [PATCH 1/4] lua: fix vlclua_release_vlc_object prototype

Steve Lhomme robux4 at ycbcr.xyz
Mon Mar 2 12:10:48 CET 2020


The pushed C function must return how many items it pushed in the Lua stack.
---
 modules/lua/libs/objects.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/lua/libs/objects.c b/modules/lua/libs/objects.c
index 420eaea8efd..1e40621e9ec 100644
--- a/modules/lua/libs/objects.c
+++ b/modules/lua/libs/objects.c
@@ -49,13 +49,14 @@ typedef struct vlclua_object {
     int (*release)(vlc_object_t *);
 } vlclua_object_t;
 
-static void vlclua_release_vlc_object(lua_State *L)
+static int vlclua_release_vlc_object(lua_State *L)
 {
     vlclua_object_t *p_luaobj = luaL_checkudata(L, 1, "vlc_object");
 
     lua_pop(L, 1);
     if (p_luaobj->release)
         p_luaobj->release(p_luaobj->object);
+    return 0;
 }
 
 static int vlclua_push_vlc_object(lua_State *L, vlc_object_t *p_obj,
-- 
2.17.1



More information about the vlc-devel mailing list