summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-08-19 12:55:34 +0200
committerwm4 <wm4@nowhere>2013-08-19 13:03:08 +0200
commitc5e66dde334c6ec5ea08418e58e0a35d0e58dd1f (patch)
treefe50501693f901ddfc5bc4d873fad336388e4407
parent216e8320b02e76a407b114ca4de73763e9df3507 (diff)
downloadmpv-c5e66dde334c6ec5ea08418e58e0a35d0e58dd1f.tar.bz2
mpv-c5e66dde334c6ec5ea08418e58e0a35d0e58dd1f.tar.xz
m_option: rename struct member named "new"
Cosmetic change to allow C++ code to include this header. See github issue #195.
-rw-r--r--mpvcore/m_config.c4
-rw-r--r--mpvcore/m_option.h6
2 files changed, 5 insertions, 5 deletions
diff --git a/mpvcore/m_config.c b/mpvcore/m_config.c
index c94b568435..d01d0ed07c 100644
--- a/mpvcore/m_config.c
+++ b/mpvcore/m_config.c
@@ -333,7 +333,7 @@ static void add_negation_option(struct m_config *config,
.name = talloc_asprintf(no_opt, "no-%s", opt->name),
.type = CONF_TYPE_STORE,
.flags = opt->flags & (M_OPT_NOCFG | M_OPT_GLOBAL | M_OPT_PRE_PARSE),
- .new = opt->new,
+ .is_new_option = opt->is_new_option,
.p = opt->p,
.offset = opt->offset,
.max = value,
@@ -381,7 +381,7 @@ static struct m_config_option *m_config_add_option(struct m_config *config,
void *optstruct = config->optstruct;
if (parent && (parent->opt->type->flags & M_OPT_TYPE_USE_SUBSTRUCT))
optstruct = substruct_read_ptr(parent->data);
- co->data = arg->new ? (char *)optstruct + arg->offset : arg->p;
+ co->data = arg->is_new_option ? (char *)optstruct + arg->offset : arg->p;
if (parent) {
// Merge case: pretend it has no parent (note that we still must follow
diff --git a/mpvcore/m_option.h b/mpvcore/m_option.h
index 1ab78fa4a8..03daa87cd4 100644
--- a/mpvcore/m_option.h
+++ b/mpvcore/m_option.h
@@ -313,7 +313,7 @@ struct m_option {
*/
void *priv;
- int new;
+ int is_new_option;
int offset;
@@ -505,12 +505,12 @@ int m_option_required_params(const m_option_t *opt);
#define OPTDEF_INT(i) .defval = (void *)&(const int){i}
#define OPT_GENERAL(ctype, optname, varname, flagv, ...) \
- {.name = optname, .flags = flagv, .new = 1, \
+ {.name = optname, .flags = flagv, .is_new_option = 1, \
.offset = MP_CHECKED_OFFSETOF(OPT_BASE_STRUCT, varname, ctype), \
__VA_ARGS__}
#define OPT_GENERAL_NOTYPE(optname, varname, flagv, ...) \
- {.name = optname, .flags = flagv, .new = 1, \
+ {.name = optname, .flags = flagv, .is_new_option = 1, \
.offset = offsetof(OPT_BASE_STRUCT, varname), \
__VA_ARGS__}