1
mirror of https://code.videolan.org/videolan/vlc synced 2024-08-31 06:46:39 +02:00

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).
This commit is contained in:
Antoine Cellerier 2009-12-14 23:33:17 +01:00
parent 6f653ce665
commit 62d4d133a9
2 changed files with 3 additions and 2 deletions

View File

@ -432,7 +432,8 @@ static const luaL_Reg vlclua_playlist_reg[] = {
{ "pause", vlclua_playlist_pause },
{ "stop", vlclua_playlist_stop },
{ "clear", vlclua_playlist_clear },
{ "repeat", vlclua_playlist_repeat },
{ "repeat", vlclua_playlist_repeat }, // repeat is a reserved lua keyword...
{ "repeat_", vlclua_playlist_repeat }, // ... provide repeat_ too.
{ "loop", vlclua_playlist_loop },
{ "random", vlclua_playlist_random },
{ "goto", vlclua_playlist_goto },

View File

@ -192,7 +192,7 @@ playlist.play(): Play.
playlist.pause(): Pause.
playlist.stop(): Stop.
playlist.clear(): Clear the playlist.
playlist.repeat( [status] ): Toggle item repeat or set to specified value.
playlist.repeat_( [status] ): Toggle item repeat or set to specified value.
playlist.loop( [status] ): Toggle playlist loop or set to specified value.
playlist.random( [status] ): Toggle playlsit random or set to specified value.
playlist.goto( id ): Go to specified track.