Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
28b7dd1a
Commit
28b7dd1a
authored
Mar 23, 2007
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a c++ compatible TAB_APPEND_CPP
parent
7934d7aa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
include/vlc_arrays.h
include/vlc_arrays.h
+8
-3
include/vlc_vlm.h
include/vlc_vlm.h
+2
-2
No files found.
include/vlc_arrays.h
View file @
28b7dd1a
...
...
@@ -86,16 +86,21 @@
(tab)= NULL; \
} while(0)
#define TAB_APPEND
(
count, tab, p ) \
#define TAB_APPEND
_CAST( cast,
count, tab, p ) \
do { \
if( (count) > 0 ) \
(tab) = realloc( tab, sizeof( void ** ) * ( (count) + 1 ) ); \
(tab) =
cast
realloc( tab, sizeof( void ** ) * ( (count) + 1 ) ); \
else \
(tab) = malloc( sizeof( void ** ) ); \
(tab) =
cast
malloc( sizeof( void ** ) ); \
(tab)[count] = (p); \
(count)++; \
} while(0)
#define TAB_APPEND( count, tab, p ) \
TAB_APPEND_CAST( , count, tab, p )
#define TAB_APPEND_CPP( type, count, tab, p ) \
TAB_APPEND_CAST( (type**), count, tab, p )
#define TAB_FIND( count, tab, p, index ) \
do { \
int _i_; \
...
...
include/vlc_vlm.h
View file @
28b7dd1a
...
...
@@ -187,9 +187,9 @@ static inline void vlm_media_Copy( vlm_media_t *p_dst, vlm_media_t *p_src )
p_dst
->
psz_name
=
strdup
(
p_src
->
psz_name
);
for
(
i
=
0
;
i
<
p_src
->
i_input
;
i
++
)
TAB_APPEND
(
p_dst
->
i_input
,
p_dst
->
ppsz_input
,
strdup
(
p_src
->
ppsz_input
[
i
])
);
TAB_APPEND
_CPP
(
char
,
p_dst
->
i_input
,
p_dst
->
ppsz_input
,
strdup
(
p_src
->
ppsz_input
[
i
])
);
for
(
i
=
0
;
i
<
p_src
->
i_option
;
i
++
)
TAB_APPEND
(
p_dst
->
i_option
,
p_dst
->
ppsz_option
,
strdup
(
p_src
->
ppsz_option
[
i
])
);
TAB_APPEND
_CPP
(
char
,
p_dst
->
i_option
,
p_dst
->
ppsz_option
,
strdup
(
p_src
->
ppsz_option
[
i
])
);
if
(
p_src
->
psz_output
)
p_dst
->
psz_output
=
strdup
(
p_src
->
psz_output
);
...
...
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