]> git.sesse.net Git - vlc/commitdiff
repeat is a reserved lua keyword
authorAntoine Cellerier <antoine@macbook.(none)>
Mon, 14 Dec 2009 22:33:17 +0000 (23:33 +0100)
committerAntoine Cellerier <antoine@macbook.(none)>
Mon, 14 Dec 2009 22:33:17 +0000 (23:33 +0100)
Provide playlist._repeat() instead (and keep the old .repeat in case
anybody was using playlist["repeat"] to workaround the reserved keyword
issue).

modules/misc/lua/libs/playlist.c
share/lua/README.txt

index 1625fc43123ff46e1d93fd56844e6e8dc09ba10b..3ded0bce8446944231f9f3226af41f01fd9ad3c7 100644 (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 },
index b0c0138bc06ad5f5bc623c46d6d13a443fd03c26..7469f530c29c5113df94fb79a8e33d24cdb5b070 100644 (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.