[vlc-commits] Lua: fix build

Jean-Baptiste Kempf git at videolan.org
Fri Nov 21 18:36:56 CET 2014


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Nov 21 18:36:31 2014 +0100| [a41e3d70a005ad48eb62cf611623f238e1632a9b] | committer: Jean-Baptiste Kempf

Lua: fix build

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

 modules/lua/libs/input.c |   42 +++++++++++++++++++++---------------------
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/modules/lua/libs/input.c b/modules/lua/libs/input.c
index 728dd97..6e76400 100644
--- a/modules/lua/libs/input.c
+++ b/modules/lua/libs/input.c
@@ -44,8 +44,6 @@
 #include "../libs.h"
 #include "../extension.h"
 
-extern const luaL_Reg vlclua_input_item_reg[];
-
 static input_item_t* vlclua_input_item_get_internal( lua_State *L );
 
 input_thread_t * vlclua_get_input_internal( lua_State *L )
@@ -254,25 +252,7 @@ static int vlclua_input_item_delete( lua_State *L )
     return 1;
 }
 
-static int vlclua_input_item_get( lua_State *L, input_item_t *p_item )
-{
-    vlc_gc_incref( p_item );
-    input_item_t **pp = lua_newuserdata( L, sizeof( input_item_t* ) );
-    *pp = p_item;
-
-    if( luaL_newmetatable( L, "input_item" ) )
-    {
-        lua_newtable( L );
-        luaL_register( L, NULL, vlclua_input_item_reg );
-        lua_setfield( L, -2, "__index" );
-        lua_pushcfunction( L, vlclua_input_item_delete );
-        lua_setfield( L, -2, "__gc" );
-    }
-
-    lua_setmetatable(L, -2);
-
-    return 1;
-}
+static int vlclua_input_item_get( lua_State *L, input_item_t *p_item );
 
 static int vlclua_input_item_get_current( lua_State *L )
 {
@@ -408,6 +388,26 @@ static const luaL_Reg vlclua_input_item_reg[] = {
     { NULL, NULL }
 };
 
+static int vlclua_input_item_get( lua_State *L, input_item_t *p_item )
+{
+    vlc_gc_incref( p_item );
+    input_item_t **pp = lua_newuserdata( L, sizeof( input_item_t* ) );
+    *pp = p_item;
+
+    if( luaL_newmetatable( L, "input_item" ) )
+    {
+        lua_newtable( L );
+        luaL_register( L, NULL, vlclua_input_item_reg );
+        lua_setfield( L, -2, "__index" );
+        lua_pushcfunction( L, vlclua_input_item_delete );
+        lua_setfield( L, -2, "__gc" );
+    }
+
+    lua_setmetatable(L, -2);
+
+    return 1;
+}
+
 
 void luaopen_input_item( lua_State *L, input_item_t *item )
 {



More information about the vlc-commits mailing list