[vlc-commits] objects: remove no longer used exported function

Rémi Denis-Courmont git at videolan.org
Sun Mar 17 02:39:14 CET 2019


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Mar 17 03:09:44 2019 +0200| [03a0a5024d0c54fec9efad1e467ec50560bd252d] | committer: Rémi Denis-Courmont

objects: remove no longer used exported function

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

 include/vlc_objects.h | 10 +---------
 src/libvlccore.sym    |  1 -
 src/misc/objects.c    | 11 -----------
 3 files changed, 1 insertion(+), 21 deletions(-)

diff --git a/include/vlc_objects.h b/include/vlc_objects.h
index fddd85eac7..6fe6696114 100644
--- a/include/vlc_objects.h
+++ b/include/vlc_objects.h
@@ -94,13 +94,6 @@ VLC_API void *vlc_object_create( vlc_object_t *, size_t ) VLC_MALLOC VLC_USED;
 VLC_API vlc_object_t *vlc_object_find_name( vlc_object_t *, const char * ) VLC_USED VLC_DEPRECATED;
 
 /**
- * Adds a weak reference to an object.
- *
- * This atomically increments the reference count of an object.
- */
-VLC_API void * vlc_object_hold(vlc_object_t *obj);
-
-/**
  * Removes a weak reference to an object.
  *
  * This atomically decrements the reference count.
@@ -190,7 +183,7 @@ VLC_API audio_output_t *aout_Hold(audio_output_t *aout);
 VLC_API void aout_Release(audio_output_t *aout);
 
 /* TODO: remove vlc_object_hold/_release() for GUIs, remove this */
-VLC_DEPRECATED static inline void *vlc_object_hold_dyn(vlc_object_t *o)
+VLC_DEPRECATED static inline void *vlc_object_hold(vlc_object_t *o)
 {
     const char *tn = vlc_object_typename(o);
 
@@ -202,7 +195,6 @@ VLC_DEPRECATED static inline void *vlc_object_hold_dyn(vlc_object_t *o)
         vout_Hold((vout_thread_t *)o);
     return o;
 }
-#define vlc_object_hold(a) vlc_object_hold_dyn(a)
 
 static inline void vlc_object_release_dyn(vlc_object_t *o)
 {
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 4feaf3c48d..8bfc3b861d 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -677,7 +677,6 @@ vlc_global_mutex
 vlc_object_create
 vlc_object_delete
 vlc_object_find_name
-vlc_object_hold
 vlc_object_release
 vlc_object_typename
 vlc_object_parent
diff --git a/src/misc/objects.c b/src/misc/objects.c
index b972584d75..eec2c95900 100644
--- a/src/misc/objects.c
+++ b/src/misc/objects.c
@@ -297,17 +297,6 @@ vlc_object_t *vlc_object_find_name( vlc_object_t *p_this, const char *psz_name )
     return NULL;
 }
 
-void *(vlc_object_hold)(vlc_object_t *p_this)
-{
-    vlc_object_internals_t *internals = vlc_internals( p_this );
-    unsigned refs = atomic_fetch_add_explicit(&internals->refs, 1,
-                                              memory_order_relaxed);
-
-    assert (refs > 0); /* Avoid obvious freed object uses */
-    (void) refs;
-    return p_this;
-}
-
 void (vlc_object_release)(vlc_object_t *obj)
 {
     vlc_object_internals_t *priv = vlc_internals(obj);



More information about the vlc-commits mailing list