[vlc-devel] commit: Remove VLC_OBJECT_LIBVLC ( Rémi Denis-Courmont )

git version control git at videolan.org
Sun Sep 28 19:48:08 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sun Sep 28 20:51:36 2008 +0300| [d699c5c3f62a1a5086ccf9269d2785e319dce702] | committer: Rémi Denis-Courmont 

Remove VLC_OBJECT_LIBVLC

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

 include/vlc_objects.h           |    1 -
 modules/misc/lua/libs/objects.c |    3 +--
 src/libvlc.c                    |    2 +-
 src/misc/objects.c              |    4 ++--
 4 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/include/vlc_objects.h b/include/vlc_objects.h
index aac0042..d53f4d3 100644
--- a/include/vlc_objects.h
+++ b/include/vlc_objects.h
@@ -32,7 +32,6 @@
  */
 
 /* Object types */
-#define VLC_OBJECT_LIBVLC      (-2)
 #define VLC_OBJECT_INTF        (-4)
 #define VLC_OBJECT_PLAYLIST    (-5)
 #define VLC_OBJECT_INPUT       (-7)
diff --git a/modules/misc/lua/libs/objects.c b/modules/misc/lua/libs/objects.c
index 593bd1f..8621ffe 100644
--- a/modules/misc/lua/libs/objects.c
+++ b/modules/misc/lua/libs/objects.c
@@ -89,8 +89,7 @@ static int vlc_object_type_from_string( const char *psz_name )
         int i_type;
         const char *psz_name;
     } pp_objects[] =
-        { { VLC_OBJECT_LIBVLC, "libvlc" },
-          { VLC_OBJECT_INTF, "intf" },
+        { { VLC_OBJECT_INTF, "intf" },
           { VLC_OBJECT_INPUT, "input" },
           { VLC_OBJECT_DECODER, "decoder" },
           { VLC_OBJECT_VOUT, "vout" },
diff --git a/src/libvlc.c b/src/libvlc.c
index 3c8df8f..7a905e2 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -256,7 +256,7 @@ libvlc_int_t * libvlc_InternalCreate( void )
 
     /* Allocate a libvlc instance object */
     p_libvlc = __vlc_custom_create( NULL, sizeof (*priv),
-                                  VLC_OBJECT_LIBVLC, "libvlc" );
+                                  VLC_OBJECT_GENERIC, "libvlc" );
     if( p_libvlc != NULL )
         i_instances++;
     vlc_mutex_unlock( lock );
diff --git a/src/misc/objects.c b/src/misc/objects.c
index d55f41a..f626362 100644
--- a/src/misc/objects.c
+++ b/src/misc/objects.c
@@ -183,8 +183,8 @@ void *__vlc_custom_create( vlc_object_t *p_this, size_t i_size,
     vlc_internals (p_priv->prev)->next = p_new;
     libvlc_unlock (p_new->p_libvlc);
 
-    if( i_type == VLC_OBJECT_LIBVLC )
-    {
+    if (p_new == VLC_OBJECT(p_new->p_libvlc))
+    {   /* TODO: should be in src/libvlc.c */
         int canc = vlc_savecancel ();
         var_Create( p_new, "list", VLC_VAR_STRING | VLC_VAR_ISCOMMAND );
         var_AddCallback( p_new, "list", DumpCommand, NULL );




More information about the vlc-devel mailing list