[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
Fri Jan 6 11:13:13 CET 2012


On Thu, Jan 05, 2012, Rafaël Carré wrote:
> I noticed this:
> 
> commit 62d4d133a9b5e66bba5545338219499133909a9b
> Author: Antoine Cellerier <antoine at macbook.(none)>
> Date:   Mon Dec 14 23:33:17 2009 +0100
> 
>     repeat is a reserved lua keyword
> 
>     Provide playlist._repeat() instead (and keep the old .repeat in case
>     anybody was using playlist["repeat"] to workaround the reserved keyword
>     issue).
> 
> IIUC it only applies to the function name though, not to the string
> interpreted by cli.lua
> 
> So Kelly, your change shouldn't affect "goto" but only vlc.playlist.goto

It might also be a good idea to still map the function to
vlc.playlist.goto so lua 5.1 users which use that function can continue
doing so ( => keeping backwards compatibility is a good idea). It is
still completely valid to name a function that way. The only invalid
thing is to call it using "vlc.playlist.goto" in lua 5.2 code.

-- 
Antoine Cellerier
dionoea



More information about the vlc-devel mailing list