From 98c0930f9b69122996cc725a08336ee6bd9abc7e Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 9 Jun 2014 23:46:53 +0200 Subject: m_config: add function to copy subopt-struct --- options/m_config.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'options/m_config.h') diff --git a/options/m_config.h b/options/m_config.h index 5a6274b945..e20a99853f 100644 --- a/options/m_config.h +++ b/options/m_config.h @@ -237,4 +237,10 @@ void m_config_set_profile(struct m_config *config, struct m_profile *p, void *m_config_alloc_struct(void *talloc_ctx, const struct m_sub_options *subopts); +// Create a copy of the struct ptr, described by opts. +// "opts" must live until the struct is free'd. +// Freeing the struct frees all members. +void *m_sub_options_copy(void *talloc_ctx, const struct m_sub_options *opts, + const void *ptr); + #endif /* MPLAYER_M_CONFIG_H */ -- cgit v1.2.3