Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
454
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
cf6ff39f
Commit
cf6ff39f
authored
5 years ago
by
Rémi Denis-Courmont
Browse files
Options
Downloads
Patches
Plain Diff
objects: remove dead code
parent
0143f10b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/misc/objects.c
+0
-69
0 additions, 69 deletions
src/misc/objects.c
src/misc/variables.h
+0
-1
0 additions, 1 deletion
src/misc/variables.h
with
0 additions
and
70 deletions
src/misc/objects.c
+
0
−
69
View file @
cf6ff39f
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
src/misc/variables.h
+
0
−
1
View file @
cf6ff39f
...
...
@@ -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
*
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment