[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.

Antoine Cellerier dionoea at videolan.org
Thu Jan 5 17:03:15 CET 2012


Hello,

On Thu, Jan 05, 2012, Kelly Anderson wrote:
> 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" } };

This doesn't seem to be the correct solution. There is no reason to
forbid using goto as a command in the cli interface. "repeat" is another
case where we needed a different name for the function since it was
already a reserved keyword in 5.1 but that didn't prevent keeping
"repeat" as the cli instruction.

Cheers,

-- 
Antoine Cellerier
dionoea



More information about the vlc-devel mailing list