[vlc-devel] commit: repeat is a reserved lua keyword (Antoine Cellerier )

git version control git at videolan.org
Mon Dec 14 23:34:22 CET 2009


vlc | branch: master | Antoine Cellerier <antoine at macbook.(none)> | Mon Dec 14 23:33:17 2009 +0100| [62d4d133a9b5e66bba5545338219499133909a9b] | committer: Antoine Cellerier 

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

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=62d4d133a9b5e66bba5545338219499133909a9b
---

 modules/misc/lua/libs/playlist.c |    3 ++-
 share/lua/README.txt             |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/misc/lua/libs/playlist.c b/modules/misc/lua/libs/playlist.c
index 1625fc4..3ded0bc 100644
--- a/modules/misc/lua/libs/playlist.c
+++ b/modules/misc/lua/libs/playlist.c
@@ -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 },
diff --git a/share/lua/README.txt b/share/lua/README.txt
index b0c0138..7469f53 100644
--- a/share/lua/README.txt
+++ b/share/lua/README.txt
@@ -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.




More information about the vlc-devel mailing list