Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
66852fb3
Commit
66852fb3
authored
Jan 27, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vlc_object_create: remove legacy support for negative sizes
parent
26fb9276
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
30 deletions
+7
-30
include/vlc_objects.h
include/vlc_objects.h
+2
-3
src/libvlccore.sym
src/libvlccore.sym
+1
-1
src/misc/objects.c
src/misc/objects.c
+4
-26
No files found.
include/vlc_objects.h
View file @
66852fb3
...
@@ -65,7 +65,7 @@ struct vlc_object_t
...
@@ -65,7 +65,7 @@ struct vlc_object_t
/*****************************************************************************
/*****************************************************************************
* Prototypes
* Prototypes
*****************************************************************************/
*****************************************************************************/
VLC_EXPORT
(
void
*
,
__vlc_object_create
,
(
vlc_object_t
*
,
in
t
)
)
LIBVLC_MALLOC
LIBVLC_USED
;
VLC_EXPORT
(
void
*
,
vlc_object_create
,
(
vlc_object_t
*
,
size_
t
)
)
LIBVLC_MALLOC
LIBVLC_USED
;
VLC_EXPORT
(
void
,
__vlc_object_set_destructor
,
(
vlc_object_t
*
,
vlc_destructor_t
)
);
VLC_EXPORT
(
void
,
__vlc_object_set_destructor
,
(
vlc_object_t
*
,
vlc_destructor_t
)
);
VLC_EXPORT
(
void
,
__vlc_object_attach
,
(
vlc_object_t
*
,
vlc_object_t
*
)
);
VLC_EXPORT
(
void
,
__vlc_object_attach
,
(
vlc_object_t
*
,
vlc_object_t
*
)
);
VLC_EXPORT
(
void
,
__vlc_object_detach
,
(
vlc_object_t
*
)
);
VLC_EXPORT
(
void
,
__vlc_object_detach
,
(
vlc_object_t
*
)
);
...
@@ -86,8 +86,7 @@ VLC_EXPORT( char *, vlc_object_get_name, ( const vlc_object_t * ) ) LIBVLC_USED;
...
@@ -86,8 +86,7 @@ VLC_EXPORT( char *, vlc_object_get_name, ( const vlc_object_t * ) ) LIBVLC_USED;
/**}@*/
/**}@*/
#define vlc_object_create(a,b) \
#define vlc_object_create(a,b) vlc_object_create( VLC_OBJECT(a), b )
__vlc_object_create( VLC_OBJECT(a), b )
#define vlc_object_set_destructor(a,b) \
#define vlc_object_set_destructor(a,b) \
__vlc_object_set_destructor( VLC_OBJECT(a), b )
__vlc_object_set_destructor( VLC_OBJECT(a), b )
...
...
src/libvlccore.sym
View file @
66852fb3
...
@@ -531,7 +531,7 @@ vlc_mutex_lock
...
@@ -531,7 +531,7 @@ vlc_mutex_lock
vlc_mutex_trylock
vlc_mutex_trylock
vlc_mutex_unlock
vlc_mutex_unlock
__vlc_object_attach
__vlc_object_attach
__
vlc_object_create
vlc_object_create
__vlc_object_detach
__vlc_object_detach
__vlc_object_find
__vlc_object_find
vlc_object_find_name
vlc_object_find_name
...
...
src/misc/objects.c
View file @
66852fb3
...
@@ -174,39 +174,17 @@ void *__vlc_custom_create( vlc_object_t *p_this, size_t i_size,
...
@@ -174,39 +174,17 @@ void *__vlc_custom_create( vlc_object_t *p_this, size_t i_size,
return
p_new
;
return
p_new
;
}
}
#undef vlc_object_create
/**
/**
* Allocates and initializes a vlc object.
* Allocates and initializes a vlc object.
*
*
* @param i_type known object type (all of them are negative integer values),
* @param i_size object byte size
* or object byte size (always positive).
*
*
* @return the new object, or NULL on error.
* @return the new object, or NULL on error.
*/
*/
void
*
__vlc_object_create
(
vlc_object_t
*
p_this
,
int
i_typ
e
)
void
*
vlc_object_create
(
vlc_object_t
*
p_this
,
size_t
i_siz
e
)
{
{
const
char
*
psz_type
;
return
vlc_custom_create
(
p_this
,
i_size
,
VLC_OBJECT_GENERIC
,
"generic"
);
size_t
i_size
;
switch
(
i_type
)
{
case
VLC_OBJECT_DECODER
:
i_size
=
sizeof
(
decoder_t
);
psz_type
=
"decoder"
;
break
;
case
VLC_OBJECT_AOUT
:
i_size
=
sizeof
(
aout_instance_t
);
psz_type
=
"audio output"
;
break
;
default:
assert
(
i_type
>
0
);
/* unknown type?! */
i_size
=
i_type
;
i_type
=
VLC_OBJECT_GENERIC
;
psz_type
=
"generic"
;
break
;
}
return
vlc_custom_create
(
p_this
,
i_size
,
i_type
,
psz_type
);
}
}
...
...
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