Export vlc_object_get_name
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 5 Sep 2009 07:59:47 +0000 (10:59 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 5 Sep 2009 08:15:15 +0000 (11:15 +0300)
include/vlc_objects.h
src/libvlc.h
src/libvlccore.sym
src/misc/objects.c

index 804fc20..a5a692f 100644 (file)
@@ -83,6 +83,8 @@ VLC_EXPORT( void *, __vlc_object_hold, ( vlc_object_t * ) );
 VLC_EXPORT( void, __vlc_object_release, ( vlc_object_t * ) );
 VLC_EXPORT( vlc_list_t *, __vlc_list_children, ( vlc_object_t * ) );
 VLC_EXPORT( void, vlc_list_release, ( vlc_list_t * ) );
+VLC_EXPORT( const char *, vlc_object_get_name, ( const vlc_object_t * ) ) LIBVLC_USED;
+#define vlc_object_get_name(o) vlc_object_get_name(VLC_OBJECT(o))
 
 /*}@*/
 
index 0889083..a513252 100644 (file)
@@ -198,11 +198,6 @@ typedef struct vlc_object_internals_t
 
 #define vlc_internals( obj ) (((vlc_object_internals_t*)(VLC_OBJECT(obj)))-1)
 
-static inline const char *vlc_object_get_name(const vlc_object_t *o)
-{
-    return vlc_internals(o)->psz_name;
-}
-
 typedef struct sap_handler_t sap_handler_t;
 
 /**
index 01cbbb4..705ddd7 100644 (file)
@@ -512,6 +512,7 @@ __vlc_object_hold
 __vlc_object_kill
 __vlc_object_release
 __vlc_object_set_destructor
+vlc_object_get_name
 vlc_plugin_set
 vlc_poll
 vlc_rand_bytes
index 63f3c2b..cb74287 100644 (file)
@@ -255,6 +255,14 @@ int vlc_object_set_name(vlc_object_t *obj, const char *name)
     return (priv->psz_name || !name) ? VLC_SUCCESS : VLC_ENOMEM;
 }
 
+#undef vlc_object_get_name
+const char *vlc_object_get_name(const vlc_object_t *obj)
+{
+    vlc_object_internals_t *priv = vlc_internals(obj);
+
+    return priv->psz_name;
+}
+
 /**
  ****************************************************************************
  * Destroy a vlc object (Internal)