[vlc-devel] [PATCH] Change goto to gotoitem for lua 5.2 compatibility.

Antoine Cellerier dionoea at videolan.org
Fri Jan 6 16:00:52 CET 2012


On Fri, Jan 06, 2012, Rafaël Carré wrote:
> >>> -    { "goto", vlclua_playlist_goto },
> >>> +    { "gotoitem", vlclua_playlist_gotoitem },
> >> No, "goto" is fine.
> > 
> > I'm pretty sure that I'm not wrong on that one.
> > That is the lua call that matches up vlc.playlist.* functions to their c 
> > code implementations.
> > We don't want to use goto there, since in the lua files you'd be using 
> > vlc.playlist.goto,this seems
> > which is going to bork on 5.2.
> 
> Sorry, you are right.

Depends what you call being right. vlc.playlist.goto is still a valid
table entry. You're just not allowed to call it in lua 5.2 scripts
unless you use vlc.playlist.["goto"]. It thus looks pretty useless to
5.2 users but users running 5.1 with scripts authored using .goto will
be pretty mad if it suddenly disapears. I'd thus leave both versions.

-- 
Antoine Cellerier
dionoea



More information about the vlc-devel mailing list