From dec53f760e12254e4baa4f7cee59010b3b10b6be Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 18 Sep 2012 20:07:24 +0200 Subject: commands: add more property-option bridge uses, rename some options Make more properties use the property-to-option bridge to reduce code size and to enforce consistency. Some options are renamed to the same as the properties (the property names are better in all cases). Do some other minor cleanups. One bigger issue was memory management of strings: M_PROPERTY_TO_STRING assumed the strings were statically allocated, and no dynamic allocations could be returned. Fix this in case the need for such properties arises in the future. Get rid of m_property_string_ro(), because it's not always clear that the "action" parameter is M_PROPERTY_SET and the string argument will be used. --- m_config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'm_config.c') diff --git a/m_config.c b/m_config.c index 444847f123..c3d624d586 100644 --- a/m_config.c +++ b/m_config.c @@ -361,8 +361,8 @@ int m_config_register_options(struct m_config *config, return 1; } -static struct m_config_option *m_config_get_co(const struct m_config *config, - struct bstr name) +struct m_config_option *m_config_get_co(const struct m_config *config, + struct bstr name) { struct m_config_option *co; -- cgit v1.2.3