vlc.msg.err("error message")
modules/lua/intf.c
static int Start_LuaIntf( vlc_object_t *p_this, const char *name )
-> luaopen_msg( L );
modules/lua/libs/messages.c
static const luaL_Reg vlclua_msg_reg[] = {
{ "dbg", vlclua_msg_dbg },
{ "warn", vlclua_msg_warn },
{ "err", vlclua_msg_err },
{ "info", vlclua_msg_info },
{ NULL, NULL }
};
void luaopen_msg( lua_State *L )
static int Start_LuaIntf( vlc_object_t *p_this, const char *name )
-> luaopen_msg( L );
modules/lua/libs/messages.c
static const luaL_Reg vlclua_msg_reg[] = {
{ "dbg", vlclua_msg_dbg },
{ "warn", vlclua_msg_warn },
{ "err", vlclua_msg_err },
{ "info", vlclua_msg_info },
{ NULL, NULL }
};
void luaopen_msg( lua_State *L )
{
lua_newtable( L );
luaL_register( L, NULL, vlclua_msg_reg );
lua_setfield( L, -2, "msg" );
}
static int vlclua_msg_err( lua_State *L )
{
int i_top = lua_gettop( L );
vlc_object_t *p_this = vlclua_get_this( L );
int i;
for( i = 1; i <= i_top; i++ )
msg_Err( p_this, "%s", luaL_checkstring( L, i ) );
return 0;
}
主要除錯資料輸出
vlc_object_t *p_this = vlclua_get_this( L );
msg_Err( p_this, "error message");
沒有留言:
張貼留言