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
85390818
Commit
85390818
authored
Jan 19, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cache: store whether there is a choices callback or not
parent
a63f061b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
src/modules/cache.c
src/modules/cache.c
+9
-5
No files found.
src/modules/cache.c
View file @
85390818
...
...
@@ -57,7 +57,7 @@
#ifdef HAVE_DYNAMIC_PLUGINS
/* Sub-version number
* (only used to avoid breakage in dev version when cache structure changes) */
#define CACHE_SUBVERSION_NUM 2
0
#define CACHE_SUBVERSION_NUM 2
1
/* Cache filename */
#define CACHE_NAME "plugins.dat"
...
...
@@ -132,8 +132,8 @@ static int CacheLoadConfig (module_config_t *cfg, FILE *file)
if
(
cfg
->
list_count
)
cfg
->
list
.
psz
=
xmalloc
(
cfg
->
list_count
*
sizeof
(
char
*
));
else
cfg
->
list
.
psz_cb
=
NULL
;
else
/* TODO: fix config_GetPszChoices() instead of this hack: */
LOAD_IMMEDIATE
(
cfg
->
list
.
psz_cb
)
;
for
(
unsigned
i
=
0
;
i
<
cfg
->
list_count
;
i
++
)
LOAD_STRING
(
cfg
->
list
.
psz
[
i
]);
}
...
...
@@ -146,8 +146,8 @@ static int CacheLoadConfig (module_config_t *cfg, FILE *file)
if
(
cfg
->
list_count
)
cfg
->
list
.
i
=
xmalloc
(
cfg
->
list_count
*
sizeof
(
int
));
else
cfg
->
list
.
i_cb
=
NULL
;
else
/* TODO: fix config_GetPszChoices() instead of this hack: */
LOAD_IMMEDIATE
(
cfg
->
list
.
i_cb
)
;
for
(
unsigned
i
=
0
;
i
<
cfg
->
list_count
;
i
++
)
LOAD_IMMEDIATE
(
cfg
->
list
.
i
[
i
]);
}
...
...
@@ -403,6 +403,8 @@ static int CacheSaveConfig (FILE *file, const module_config_t *cfg)
if
(
IsConfigStringType
(
cfg
->
i_type
))
{
SAVE_STRING
(
cfg
->
orig
.
psz
);
if
(
cfg
->
list_count
==
0
)
SAVE_IMMEDIATE
(
cfg
->
list
.
psz_cb
);
/* XXX: see CacheLoadConfig() */
for
(
unsigned
i
=
0
;
i
<
cfg
->
list_count
;
i
++
)
SAVE_STRING
(
cfg
->
list
.
psz
[
i
]);
}
...
...
@@ -411,6 +413,8 @@ static int CacheSaveConfig (FILE *file, const module_config_t *cfg)
SAVE_IMMEDIATE
(
cfg
->
orig
);
SAVE_IMMEDIATE
(
cfg
->
min
);
SAVE_IMMEDIATE
(
cfg
->
max
);
if
(
cfg
->
list_count
==
0
)
SAVE_IMMEDIATE
(
cfg
->
list
.
i_cb
);
/* XXX: see CacheLoadConfig() */
for
(
unsigned
i
=
0
;
i
<
cfg
->
list_count
;
i
++
)
SAVE_IMMEDIATE
(
cfg
->
list
.
i
[
i
]);
}
...
...
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