]> git.sesse.net Git - vlc/commitdiff
lua: remove leading '__' in function name
authorRémi Duraffort <ivoire@videolan.org>
Mon, 11 Jul 2011 13:41:26 +0000 (15:41 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Wed, 13 Jul 2011 08:48:03 +0000 (10:48 +0200)
modules/lua/libs/objects.c
modules/lua/libs/objects.h
modules/lua/libs/variables.c
modules/lua/libs/variables.h
modules/lua/vlc.c
modules/lua/vlc.h

index 32c2bd2f77721edc848b5aea8de2dfb43098a3f4..bcc6f133ab0d45d16a7b22c5fe18bd3daf644b3a 100644 (file)
@@ -51,29 +51,6 @@ typedef struct
 /*****************************************************************************
  * Generic vlc_object_t wrapper creation
  *****************************************************************************/
-int __vlclua_push_vlc_object( lua_State *L, vlc_object_t *p_obj,
-                              lua_CFunction pf_gc )
-{
-    vlc_object_t **udata = (vlc_object_t **)
-        lua_newuserdata( L, sizeof( vlc_object_t * ) );
-    *udata = p_obj;
-
-    if( luaL_newmetatable( L, "vlc_object" ) )
-    {
-        /* Hide the metatable */
-        lua_pushliteral( L, "none of your business" );
-        lua_setfield( L, -2, "__metatable" );
-        if( pf_gc ) /* FIXME */
-        {
-            /* Set the garbage collector if needed */
-            lua_pushcfunction( L, pf_gc );
-            lua_setfield( L, -2, "__gc" );
-        }
-    }
-    lua_setmetatable( L, -2 );
-    return 1;
-}
-
 int vlclua_gc_release( lua_State *L )
 {
     vlc_object_t **p_obj = (vlc_object_t **)luaL_checkudata( L, 1, "vlc_object" );
@@ -118,6 +95,30 @@ static int vlclua_get_input( lua_State *L )
     return 1;
 }
 
+#undef vlclua_push_vlc_object
+int vlclua_push_vlc_object( lua_State *L, vlc_object_t *p_obj,
+                              lua_CFunction pf_gc )
+{
+    vlc_object_t **udata = (vlc_object_t **)
+        lua_newuserdata( L, sizeof( vlc_object_t * ) );
+    *udata = p_obj;
+
+    if( luaL_newmetatable( L, "vlc_object" ) )
+    {
+        /* Hide the metatable */
+        lua_pushliteral( L, "none of your business" );
+        lua_setfield( L, -2, "__metatable" );
+        if( pf_gc ) /* FIXME */
+        {
+            /* Set the garbage collector if needed */
+            lua_pushcfunction( L, pf_gc );
+            lua_setfield( L, -2, "__gc" );
+        }
+    }
+    lua_setmetatable( L, -2 );
+    return 1;
+}
+
 /*****************************************************************************
  *
  *****************************************************************************/
index cc91faba0cbd69d0f6049cc88140c70e0fcccac5..687a1d5e8ed76b4efc478566a9c1e62e7e6c53e4 100644 (file)
 #ifndef VLC_LUA_OBJECTS_H
 #define VLC_LUA_OBJECTS_H
 
-int __vlclua_push_vlc_object( lua_State *L, vlc_object_t *p_obj,
+int vlclua_push_vlc_object( lua_State *L, vlc_object_t *p_obj,
                               lua_CFunction pf_gc );
 #define vlclua_push_vlc_object( a, b, c ) \
-        __vlclua_push_vlc_object( a, VLC_OBJECT( b ), c )
+        vlclua_push_vlc_object( a, VLC_OBJECT( b ), c )
 int vlclua_gc_release( lua_State *L );
 
 #endif
index 26bc0d9057d37646a6387c7ff83c32482ded593a..cb866b3851f183f0b9bd67febd81d6443723999c 100644 (file)
@@ -263,8 +263,9 @@ static int vlclua_libvlc_command( lua_State *L )
     return vlclua_push_ret( L, i_ret );
 }
 
-int __vlclua_var_toggle_or_set( lua_State *L, vlc_object_t *p_obj,
-                                const char *psz_name )
+#undef vlclua_var_toggle_or_set
+int vlclua_var_toggle_or_set( lua_State *L, vlc_object_t *p_obj,
+                              const char *psz_name )
 {
     bool b_bool;
     if( lua_gettop( L ) > 1 ) return vlclua_error( L );
index f87e78a8d550de6ab03a244ca3fe3c6edccd6e81..cbc60d84a45a1467203fbdd8552e5214d54257b1 100644 (file)
 #ifndef VLC_LUA_VARIABLES_H
 #define VLC_LUA_VARIABLES_H
 
-#define vlclua_var_toggle_or_set(a,b,c) \
-    __vlclua_var_toggle_or_set(a,VLC_OBJECT(b),c)
-int __vlclua_var_toggle_or_set( lua_State *, vlc_object_t *, const char * );
+int vlclua_var_toggle_or_set( lua_State *, vlc_object_t *, const char * );
+
+#define vlclua_var_toggle_or_set( a, b, c ) \
+        vlclua_var_toggle_or_set( a, VLC_OBJECT( b ), c )
 
 #endif
 
index 26e30caa39bec8d380eb1df4af1b1cfda9c39642..88e23e8a01d12b134be36a99102bec4a5e303e3f 100644 (file)
@@ -372,8 +372,9 @@ char *vlclua_find_file( vlc_object_t *p_this, const char *psz_luadirname, const
  * Meta data setters utility.
  * Playlist item table should be on top of the stack when these are called
  *****************************************************************************/
-void __vlclua_read_meta_data( vlc_object_t *p_this, lua_State *L,
-                              input_item_t *p_input )
+#undef vlclua_read_meta_data
+void vlclua_read_meta_data( vlc_object_t *p_this, lua_State *L,
+                            input_item_t *p_input )
 {
 #define TRY_META( a, b )                                        \
     lua_getfield( L, -1, a );                                   \
@@ -406,7 +407,8 @@ void __vlclua_read_meta_data( vlc_object_t *p_this, lua_State *L,
     TRY_META( "trackid", TrackID );
 }
 
-void __vlclua_read_custom_meta_data( vlc_object_t *p_this, lua_State *L,
+#undef vlclua_read_custom_meta_data
+void vlclua_read_custom_meta_data( vlc_object_t *p_this, lua_State *L,
                                      input_item_t *p_input )
 {
     /* Lock the input item and create the meta table if needed */
@@ -451,7 +453,8 @@ void __vlclua_read_custom_meta_data( vlc_object_t *p_this, lua_State *L,
 /**
  * Playlist item table should be on top of the stack when this is called
  */
-void __vlclua_read_options( vlc_object_t *p_this, lua_State *L,
+#undef vlclua_read_options
+void vlclua_read_options( vlc_object_t *p_this, lua_State *L,
                             int *pi_options, char ***pppsz_options )
 {
     lua_getfield( L, -1, "options" );
@@ -477,7 +480,8 @@ void __vlclua_read_options( vlc_object_t *p_this, lua_State *L,
     lua_pop( L, 1 ); /* pop "options" */
 }
 
-int __vlclua_playlist_add_internal( vlc_object_t *p_this, lua_State *L,
+#undef vlclua_playlist_add_internal
+int vlclua_playlist_add_internal( vlc_object_t *p_this, lua_State *L,
                                     playlist_t *p_playlist,
                                     input_item_t *p_parent, bool b_play )
 {
@@ -750,7 +754,8 @@ static int vlclua_add_modules_path_inner( lua_State *L, const char *psz_path )
     return count;
 }
 
-int __vlclua_add_modules_path( vlc_object_t *obj, lua_State *L, const char *psz_filename )
+#undef vlclua_add_modules_path
+int vlclua_add_modules_path( vlc_object_t *obj, lua_State *L, const char *psz_filename )
 {
     /* Setup the module search path:
      *   * "The script's directory"/modules
index 6aa47aa78f098e5314de8f881d7f12af39593431..5d87914c5a20480028845d4f7bc49fce1cb13f22 100644 (file)
@@ -135,19 +135,19 @@ int vlclua_dofile( vlc_object_t *p_this, lua_State *L, const char *url );
 /*****************************************************************************
  * Playlist and meta data internal utilities.
  *****************************************************************************/
-void __vlclua_read_options( vlc_object_t *, lua_State *, int *, char *** );
-#define vlclua_read_options(a,b,c,d) __vlclua_read_options(VLC_OBJECT(a),b,c,d)
-void __vlclua_read_meta_data( vlc_object_t *, lua_State *, input_item_t * );
-#define vlclua_read_meta_data(a,b,c) __vlclua_read_meta_data(VLC_OBJECT(a),b,c)
-void __vlclua_read_custom_meta_data( vlc_object_t *, lua_State *,
-                                     input_item_t *);
-#define vlclua_read_custom_meta_data(a,b,c) __vlclua_read_custom_meta_data(VLC_OBJECT(a),b,c)
-int __vlclua_playlist_add_internal( vlc_object_t *, lua_State *, playlist_t *,
-                                    input_item_t *, bool );
-#define vlclua_playlist_add_internal(a,b,c,d,e) __vlclua_playlist_add_internal(VLC_OBJECT(a),b,c,d,e)
-
-int __vlclua_add_modules_path( vlc_object_t *, lua_State *, const char *psz_filename );
-#define vlclua_add_modules_path( a, b, c ) __vlclua_add_modules_path(VLC_OBJECT(a), b, c)
+void vlclua_read_options( vlc_object_t *, lua_State *, int *, char *** );
+#define vlclua_read_options( a, b, c, d ) vlclua_read_options( VLC_OBJECT( a ), b, c, d )
+void vlclua_read_meta_data( vlc_object_t *, lua_State *, input_item_t * );
+#define vlclua_read_meta_data( a, b, c ) vlclua_read_meta_data( VLC_OBJECT( a ), b, c )
+void vlclua_read_custom_meta_data( vlc_object_t *, lua_State *,
+                                   input_item_t *);
+#define vlclua_read_custom_meta_data( a, b, c ) vlclua_read_custom_meta_data( VLC_OBJECT( a ), b, c )
+int vlclua_playlist_add_internal( vlc_object_t *, lua_State *, playlist_t *,
+                                  input_item_t *, bool );
+#define vlclua_playlist_add_internal( a, b, c, d, e ) vlclua_playlist_add_internal( VLC_OBJECT( a ), b, c, d, e )
+
+int vlclua_add_modules_path( vlc_object_t *, lua_State *, const char *psz_filename );
+#define vlclua_add_modules_path( a, b, c ) vlclua_add_modules_path( VLC_OBJECT( a ), b, c )
 
 /**
  * Per-interface private state