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

Rafaël Carré rafael.carre at gmail.com
Thu Jan 5 21:10:35 CET 2012


Le 2012-01-05 11:03, Antoine Cellerier a écrit :
> 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.

This seems weird indeed, can you paste the exact error you have with
luac 5.2 ?

It worked fine for me



More information about the vlc-devel mailing list