From 059262c7466b4de5349aa0153312b0f44f9ef8ef Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 13 Jul 2019 00:38:28 +0200 Subject: m_config: move group list to internal context This is good because a private thing is not so public anymore, and it's also preparation for further changes. Some tricky memory management issues: m_config_data (i.e. config->data) now depends on m_config_shadow, instead of m_config. In particular, free_option_data() accesses the m_config_shadow.groups array. Obviously it must be freed before m_config_shadow. --- options/m_config.h | 7 ------- 1 file changed, 7 deletions(-) (limited to 'options/m_config.h') diff --git a/options/m_config.h b/options/m_config.h index a640f43eef..207870e12a 100644 --- a/options/m_config.h +++ b/options/m_config.h @@ -87,13 +87,6 @@ typedef struct m_config { void *optstruct; // struct mpopts or other - // Private. List of m_sub_options instances. - // Index 0 is the top-level and is always present. - // Immutable after init. - // Invariant: a parent is always at a lower index than any of its children. - struct m_config_group *groups; - int num_groups; - // Private. Non-NULL if data was allocated. m_config_option.data uses it. struct m_config_data *data; -- cgit v1.2.3