Commit c1d3b260 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

LUA: avoid leading underscores

parent 8378cde8
...@@ -47,19 +47,20 @@ ...@@ -47,19 +47,20 @@
#include "../vlc.h" #include "../vlc.h"
#include "../libs.h" #include "../libs.h"
#undef vlclua_set_this
/***************************************************************************** /*****************************************************************************
* Internal lua<->vlc utils * 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_pushlightuserdata( L, p_this );
lua_rawset( L, LUA_REGISTRYINDEX ); lua_rawset( L, LUA_REGISTRYINDEX );
} }
vlc_object_t * vlclua_get_this( lua_State *L ) 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 ); lua_rawget( L, LUA_REGISTRYINDEX );
vlc_object_t *p_this = (vlc_object_t*)lua_topointer( L, -1 ); vlc_object_t *p_this = (vlc_object_t*)lua_topointer( L, -1 );
lua_pop( L, 1 ); lua_pop( L, 1 );
......
...@@ -91,8 +91,8 @@ static inline const char *luaL_nilorcheckstring( lua_State *L, int narg ) ...@@ -91,8 +91,8 @@ static inline const char *luaL_nilorcheckstring( lua_State *L, int narg )
return luaL_checkstring( L, 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 * ); vlc_object_t * vlclua_get_this( lua_State * );
/***************************************************************************** /*****************************************************************************
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment