Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
38276a46
Commit
38276a46
authored
May 04, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove VLC_OBJECT_GLOBAL
parent
bf523119
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
7 deletions
+9
-7
include/vlc_objects.h
include/vlc_objects.h
+1
-1
modules/misc/lua/objects.c
modules/misc/lua/objects.c
+1
-2
src/misc/objects.c
src/misc/objects.c
+6
-3
src/misc/threads.c
src/misc/threads.c
+1
-1
No files found.
include/vlc_objects.h
View file @
38276a46
...
...
@@ -36,7 +36,7 @@
*/
/* Object types */
#define VLC_OBJECT_GLOBAL (-1)
#define VLC_OBJECT_LIBVLC (-2)
#define VLC_OBJECT_MODULE (-3)
#define VLC_OBJECT_INTF (-4)
...
...
modules/misc/lua/objects.c
View file @
38276a46
...
...
@@ -107,8 +107,7 @@ static int vlc_object_type_from_string( const char *psz_name )
int
i_type
;
const
char
*
psz_name
;
}
pp_objects
[]
=
{
{
VLC_OBJECT_GLOBAL
,
"global"
},
{
VLC_OBJECT_LIBVLC
,
"libvlc"
},
{
{
VLC_OBJECT_LIBVLC
,
"libvlc"
},
{
VLC_OBJECT_MODULE
,
"module"
},
{
VLC_OBJECT_INTF
,
"intf"
},
{
VLC_OBJECT_PLAYLIST
,
"playlist"
},
...
...
src/misc/objects.c
View file @
38276a46
...
...
@@ -143,9 +143,9 @@ void *vlc_custom_create( vlc_object_t *p_this, size_t i_size,
}
libvlc_global_data_t
*
p_libvlc_global
;
if
(
i_type
==
VLC_OBJECT_GLOBA
L
)
if
(
p_this
==
NUL
L
)
{
/*
If i_type is global, then p_new is actually p_libvlc_global
*/
/*
Only the global root object is created out of the blue
*/
p_libvlc_global
=
(
libvlc_global_data_t
*
)
p_new
;
p_new
->
p_libvlc
=
NULL
;
...
...
@@ -379,10 +379,12 @@ static void vlc_object_destroy( vlc_object_t *p_this )
free
(
p_this
->
psz_header
);
if
(
p_this
->
i_object_type
==
VLC_OBJECT_GLOBA
L
)
if
(
p_this
->
p_libvlc
==
NUL
L
)
{
libvlc_global_data_t
*
p_global
=
(
libvlc_global_data_t
*
)
p_this
;
#ifndef NDEBUG
assert
(
p_global
==
vlc_global
()
);
/* Test for leaks */
if
(
p_global
->
i_objects
>
0
)
{
...
...
@@ -408,6 +410,7 @@ static void vlc_object_destroy( vlc_object_t *p_this )
/* Strongly abort, cause we want these to be fixed */
abort
();
}
#endif
/* We are the global object ... no need to lock. */
free
(
p_global
->
pp_objects
);
...
...
src/misc/threads.c
View file @
38276a46
...
...
@@ -143,7 +143,7 @@ int vlc_threads_init( void )
if
(
i_initializations
==
0
)
{
p_root
=
vlc_custom_create
(
NULL
,
sizeof
(
*
p_root
),
VLC_OBJECT_G
LOBAL
,
"global
"
);
VLC_OBJECT_G
ENERIC
,
"root
"
);
if
(
p_root
==
NULL
)
{
i_ret
=
VLC_ENOMEM
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment