[vlc-devel] [PATCH 3/3] Replace goto with gotoitem. goto is reserved in lua 5.2. luac will fail to compile the lua source files without this change.
Kelly Anderson
kelly at silka.with-linux.com
Thu Jan 5 14:23:37 CET 2012
---
modules/lua/libs/playlist.c | 4 ++--
share/lua/intf/cli.lua | 2 +-
share/lua/intf/modules/httprequests.lua | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/modules/lua/libs/playlist.c b/modules/lua/libs/playlist.c
index 2336a37..c95ce5a 100644
--- a/modules/lua/libs/playlist.c
+++ b/modules/lua/libs/playlist.c
@@ -123,7 +123,7 @@ static int vlclua_playlist_random( lua_State * L )
return i_ret;
}
-static int vlclua_playlist_goto( lua_State * L )
+static int vlclua_playlist_gotoitem( lua_State * L )
{
int i_id = luaL_checkint( L, 1 );
playlist_t *p_playlist = vlclua_get_playlist_internal( L );
@@ -377,7 +377,7 @@ static const luaL_Reg vlclua_playlist_reg[] = {
{ "repeat_", vlclua_playlist_repeat }, // ... provide repeat_ too.
{ "loop", vlclua_playlist_loop },
{ "random", vlclua_playlist_random },
- { "goto", vlclua_playlist_goto },
+ { "gotoitem", vlclua_playlist_gotoitem },
{ "add", vlclua_playlist_add },
{ "enqueue", vlclua_playlist_enqueue },
{ "get", vlclua_playlist_get },
diff --git a/share/lua/intf/cli.lua b/share/lua/intf/cli.lua
index 265b938..9f89d11 100644
--- a/share/lua/intf/cli.lua
+++ b/share/lua/intf/cli.lua
@@ -535,7 +535,7 @@ commands_ordered = {
{ "stop"; { func = skip2(vlc.playlist.stop); help = "stop stream" } };
{ "next"; { func = skip2(vlc.playlist.next); help = "next playlist item" } };
{ "prev"; { func = skip2(vlc.playlist.prev); help = "previous playlist item" } };
- { "goto"; { func = skip2(vlc.playlist.goto); help = "goto item at index" } };
+ { "gotoitem"; { func = skip2(vlc.playlist.gotoitem); help = "goto item at index" } };
{ "repeat"; { func = skip2(vlc.playlist.repeat_); args = "[on|off]"; help = "toggle playlist repeat" } };
{ "loop"; { func = skip2(vlc.playlist.loop); args = "[on|off]"; help = "toggle playlist loop" } };
{ "random"; { func = skip2(vlc.playlist.random); args = "[on|off]"; help = "toggle playlist random" } };
diff --git a/share/lua/intf/modules/httprequests.lua b/share/lua/intf/modules/httprequests.lua
index 407ab3e..56805ab 100644
--- a/share/lua/intf/modules/httprequests.lua
+++ b/share/lua/intf/modules/httprequests.lua
@@ -93,14 +93,14 @@ processcommands = function ()
if id == -1 then
vlc.playlist.play()
else
- vlc.playlist.goto(id)
+ vlc.playlist.gotoitem(id)
end
elseif command == "pl_pause" then
if vlc.playlist.status() == "stopped" then
if id == -1 then
vlc.playlist.play()
else
- vlc.playlist.goto(id)
+ vlc.playlist.gotoitem(id)
end
else
vlc.playlist.pause()
--
1.7.8.2
More information about the vlc-devel
mailing list