[vlc-commits] commit: LUA: avoid leading underscores ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Sun Apr 11 13:57:24 CEST 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Apr 11 14:30:14 2010 +0300| [c1d3b2601db93714ebd957c7dc476ba37e5e7b99] | committer: Rémi Denis-Courmont 

LUA: avoid leading underscores

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

 modules/misc/lua/libs/misc.c |    7 ++++---
 modules/misc/lua/vlc.h       |    4 ++--
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/modules/misc/lua/libs/misc.c b/modules/misc/lua/libs/misc.c
index 10d1424..3b1fbae 100644
--- a/modules/misc/lua/libs/misc.c
+++ b/modules/misc/lua/libs/misc.c
@@ -47,19 +47,20 @@
 #include "../vlc.h"
 #include "../libs.h"
 
+#undef vlclua_set_this
 /*****************************************************************************
  * Internal lua<->vlc utils
  *****************************************************************************/
-void __vlclua_set_this( lua_State *L, vlc_object_t *p_this )
+void vlclua_set_this( lua_State *L, vlc_object_t *p_this )
 {
-    lua_pushlightuserdata( L, __vlclua_set_this );
+    lua_pushlightuserdata( L, vlclua_set_this );
     lua_pushlightuserdata( L, p_this );
     lua_rawset( L, LUA_REGISTRYINDEX );
 }
 
 vlc_object_t * vlclua_get_this( lua_State *L )
 {
-    lua_pushlightuserdata( L, __vlclua_set_this );
+    lua_pushlightuserdata( L, vlclua_set_this );
     lua_rawget( L, LUA_REGISTRYINDEX );
     vlc_object_t *p_this = (vlc_object_t*)lua_topointer( L, -1 );
     lua_pop( L, 1 );
diff --git a/modules/misc/lua/vlc.h b/modules/misc/lua/vlc.h
index 20b19fd..0669c2d 100644
--- a/modules/misc/lua/vlc.h
+++ b/modules/misc/lua/vlc.h
@@ -91,8 +91,8 @@ static inline const char *luaL_nilorcheckstring( lua_State *L, int narg )
     return luaL_checkstring( L, narg );
 }
 
-#define vlclua_set_this(a, b) __vlclua_set_this(a, VLC_OBJECT(b))
-void __vlclua_set_this( lua_State *, vlc_object_t * );
+void vlclua_set_this( lua_State *, vlc_object_t * );
+#define vlclua_set_this(a, b) vlclua_set_this(a, VLC_OBJECT(b))
 vlc_object_t * vlclua_get_this( lua_State * );
 
 /*****************************************************************************



More information about the vlc-commits mailing list