diff options
author | wm4 <wm4@nowhere> | 2013-03-01 11:27:59 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-03-01 11:27:59 +0100 |
commit | c9088fff86068f3fc983ec6944e648cdc3ebe0a3 (patch) | |
tree | 7612c7b65517359e1e64c37dd4e7e429ecfa054c /core | |
parent | 95b8585d76bf8b719dd9b82d305e169971f73570 (diff) | |
download | mpv-c9088fff86068f3fc983ec6944e648cdc3ebe0a3.tar.bz2 mpv-c9088fff86068f3fc983ec6944e648cdc3ebe0a3.tar.xz |
m_option: don't define OPT_BASE_STRUCT by default
OPT_BASE_STRUCT defines which struct the OPT_ macros (like OPT_INT etc.)
reference implicitly, since these macros take struct member names but no
struct type. Normally, only cfg-mplayer.h should need this, and other
places shouldn't be bothered with having to #undef it.
(Some files, like demux_lavf.c, still store their options in MPOpts. In
the long term, this should be removed, and handled like e.g. with VO
suboptions instead.)
Diffstat (limited to 'core')
-rw-r--r-- | core/cfg-mplayer.h | 2 | ||||
-rw-r--r-- | core/input/input.c | 2 | ||||
-rw-r--r-- | core/m_option.h | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/core/cfg-mplayer.h b/core/cfg-mplayer.h index 22017f930b..651ec61a77 100644 --- a/core/cfg-mplayer.h +++ b/core/cfg-mplayer.h @@ -282,6 +282,8 @@ const m_option_t msgl_config[]={ extern const m_option_t lavc_decode_opts_conf[]; +#define OPT_BASE_STRUCT struct MPOpts + const m_option_t common_opts[] = { // ------------------------- common options -------------------- OPT_FLAG("quiet", quiet, CONF_GLOBAL), diff --git a/core/input/input.c b/core/input/input.c index 5d5e3f3a67..6419f28bc1 100644 --- a/core/input/input.c +++ b/core/input/input.c @@ -518,6 +518,8 @@ int async_quit_request; static int print_key_list(m_option_t *cfg, char *optname, char *optparam); static int print_cmd_list(m_option_t *cfg, char *optname, char *optparam); +#define OPT_BASE_STRUCT struct MPOpts + // Our command line options static const m_option_t input_conf[] = { OPT_STRING("conf", input.config_file, CONF_GLOBAL), diff --git a/core/m_option.h b/core/m_option.h index 5720b30b94..d06e189449 100644 --- a/core/m_option.h +++ b/core/m_option.h @@ -619,6 +619,4 @@ static inline void m_option_free(const m_option_t *opt, void *dst) .type = &m_option_type_subconfig_struct, \ .priv = (void*)&subconf) -#define OPT_BASE_STRUCT struct MPOpts - #endif /* MPLAYER_M_OPTION_H */ |