[vlc-commits] objects: remove dead code
Rémi Denis-Courmont
git at videolan.org
Sat Apr 13 17:52:49 CEST 2019
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Apr 13 18:07:12 2019 +0300| [cf6ff39f1e31fc1f09fb0af25ebeea400e6d78f5] | committer: Rémi Denis-Courmont
objects: remove dead code
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cf6ff39f1e31fc1f09fb0af25ebeea400e6d78f5
---
src/misc/objects.c | 69 ----------------------------------------------------
src/misc/variables.h | 1 -
2 files changed, 70 deletions(-)
diff --git a/src/misc/objects.c b/src/misc/objects.c
index 945ebffbc6..bb634f6d41 100644
--- a/src/misc/objects.c
+++ b/src/misc/objects.c
@@ -62,75 +62,6 @@ static struct vlc_list tree_list = VLC_LIST_INITIALIZER(&tree_list);
vlc_list_foreach(pos, &tree_list, list) \
if (pos->parent == vlc_externals(priv))
-static bool ObjectIsLastChild(vlc_object_t *obj, vlc_object_t *parent)
-{
- struct vlc_list *node = &vlc_internals(obj)->list;
-
- while ((node = node->next) != &tree_list) {
- vlc_object_internals_t *priv =
- container_of(node, vlc_object_internals_t, list);
-
- if (priv->parent == parent)
- return false;
- }
- return true;
-}
-
-static bool ObjectHasChildLocked(vlc_object_t *obj)
-{
- vlc_object_internals_t *priv;
-
- vlc_children_foreach(priv, vlc_internals(obj))
- return true;
- return false;
-}
-
-static void PrintObjectPrefix(vlc_object_t *obj, FILE *output, bool last)
-{
- vlc_object_t *parent = vlc_object_parent(obj);
- const char *str;
-
- if (parent == NULL)
- return;
-
- PrintObjectPrefix(parent, output, false);
-
- if (ObjectIsLastChild(obj, parent))
- str = last ? " \xE2\x94\x94" : " ";
- else
- str = last ? " \xE2\x94\x9C" : " \xE2\x94\x82";
-
- fputs(str, output);
-}
-
-static void PrintObject(vlc_object_t *obj, FILE *output)
-{
- int canc = vlc_savecancel ();
-
- PrintObjectPrefix(obj, output, true);
- fprintf(output, "\xE2\x94\x80\xE2\x94%c\xE2\x95\xB4%p %s\n",
- ObjectHasChildLocked(obj) ? 0xAC : 0x80,
- (void *)obj, vlc_object_typename(obj));
-
- vlc_restorecancel (canc);
-}
-
-void DumpStructureLocked(vlc_object_t *obj, FILE *output, unsigned level)
-{
- PrintObject(obj, output);
-
- if (unlikely(level > 100))
- {
- msg_Warn (obj, "structure tree is too deep");
- return;
- }
-
- vlc_object_internals_t *priv;
-
- vlc_children_foreach(priv, vlc_internals(obj))
- DumpStructureLocked(vlc_externals(priv), output, level + 1);
-}
-
#undef vlc_custom_create
void *vlc_custom_create (vlc_object_t *parent, size_t length,
const char *typename)
diff --git a/src/misc/variables.h b/src/misc/variables.h
index a9f2f4dbc2..2acd7d4158 100644
--- a/src/misc/variables.h
+++ b/src/misc/variables.h
@@ -55,7 +55,6 @@ struct vlc_object_internals
# define vlc_externals( priv ) ((vlc_object_t *)((priv) + 1))
void DumpVariables(vlc_object_t *obj);
-void DumpStructureLocked(vlc_object_t *obj, FILE *output, unsigned level);
extern void var_DestroyAll( vlc_object_t * );
More information about the vlc-commits
mailing list