From d8d42b44fc717c695af59c14213d54885088ea37 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 21 Dec 2013 19:45:42 +0100 Subject: m_option, m_config: mp_msg conversions Always pass around mp_log contexts in the option parser code. This of course affects all users of this API as well. In stream.c, pass a mp_null_log, because we can't do it properly yet. This will be fixed later. --- options/m_config.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'options/m_config.h') diff --git a/options/m_config.h b/options/m_config.h index 829fa90ba7..2624f45edf 100644 --- a/options/m_config.h +++ b/options/m_config.h @@ -34,6 +34,7 @@ struct m_option_type; struct m_sub_options; struct m_obj_desc; struct m_obj_settings; +struct mp_log; // Config option struct m_config_option { @@ -48,6 +49,8 @@ struct m_config_option { // Config object /** \ingroup Config */ typedef struct m_config { + struct mp_log *log; + // Registered options. struct m_config_option *opts; // all options, even suboptions int num_opts; @@ -77,14 +80,15 @@ typedef struct m_config { // and a corresponding option switch or sub-option field. // suboptinit: if not NULL, initialize the suboption string (used for presets) // Note that the m_config object will keep pointers to defaults and options. -struct m_config *m_config_new(void *talloc_ctx, size_t size, - const void *defaults, +struct m_config *m_config_new(void *talloc_ctx, struct mp_log *log, + size_t size, const void *defaults, const struct m_option *options); -struct m_config *m_config_from_obj_desc(void *talloc_ctx, +struct m_config *m_config_from_obj_desc(void *talloc_ctx, struct mp_log *log, struct m_obj_desc *desc); struct m_config *m_config_from_obj_desc_noalloc(void *talloc_ctx, + struct mp_log *log, struct m_obj_desc *desc); int m_config_set_obj_params(struct m_config *conf, char **args); -- cgit v1.2.3