Commit a41e3d70 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Lua: fix build

parent 7054ccad
......@@ -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 )
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment