summaryrefslogtreecommitdiffstats
path: root/options/m_config.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-10-06 21:20:10 +0200
committerwm4 <wm4@nowhere>2014-10-06 21:49:26 +0200
commitd26104351b65a212c03ec08679cb45a3aa2f0a32 (patch)
tree6bbdde0b14316cf090924947dd98d6193bcd4634 /options/m_config.h
parentf440c0626e9159945cc8974f0a7b0ea46d1c8510 (diff)
downloadmpv-d26104351b65a212c03ec08679cb45a3aa2f0a32.tar.bz2
mpv-d26104351b65a212c03ec08679cb45a3aa2f0a32.tar.xz
m_config: add function to copy all options
Needed to copy the global option struct in the next commit.
Diffstat (limited to 'options/m_config.h')
-rw-r--r--options/m_config.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/options/m_config.h b/options/m_config.h
index eb255428e0..2a27dc69a6 100644
--- a/options/m_config.h
+++ b/options/m_config.h
@@ -55,6 +55,11 @@ typedef struct m_config {
struct m_config_option *opts; // all options, even suboptions
int num_opts;
+ // Creation parameters
+ size_t size;
+ const void *defaults;
+ const struct m_option *options;
+
// List of defined profiles.
struct m_profile *profiles;
// Depth when recursively including profiles.
@@ -87,6 +92,9 @@ struct m_config *m_config_new(void *talloc_ctx, struct mp_log *log,
size_t size, const void *defaults,
const struct m_option *options);
+// (Warning: new object references config->log and others.)
+struct m_config *m_config_dup(void *talloc_ctx, struct m_config *config);
+
struct m_config *m_config_from_obj_desc(void *talloc_ctx, struct mp_log *log,
struct m_obj_desc *desc);