path: root/m_config.h
diff options
authorwm4 <wm4@nowhere>2012-09-18 20:07:24 +0200
committerwm4 <wm4@nowhere>2012-10-12 10:10:31 +0200
commitdec53f760e12254e4baa4f7cee59010b3b10b6be (patch)
tree41edc95ce49dca2a7188bc88f9a7a9eb2964963c /m_config.h
parent28f43ce9a9d543fccb10aaf574282c349408946f (diff)
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.
Diffstat (limited to 'm_config.h')
1 files changed, 3 insertions, 0 deletions
diff --git a/m_config.h b/m_config.h
index 80897ce0e4..21df442c55 100644
--- a/m_config.h
+++ b/m_config.h
@@ -153,6 +153,9 @@ int m_config_parse_suboptions(struct m_config *config, char *name,
const struct m_option *m_config_get_option(const struct m_config *config,
struct bstr name);
+struct m_config_option *m_config_get_co(const struct m_config *config,
+ struct bstr name);
/* Print a list of all registered options.
* \param config The config object.