m_config: discourage mp_read_option_raw()

This function is dangerous, because it disables the already basic/week
type checking the option system has at all. I'm tend towards thinking
that all of its uses should be replaced.
This commit is contained in:
wm4 2019-11-25 00:52:30 +01:00
parent 3a2dc8b22e
commit d123af34b5
1 changed files with 1 additions and 0 deletions

View File

@ -338,6 +338,7 @@ void *mp_get_config_group(void *ta_parent, struct mpv_global *global,
// Read a single global option in a thread-safe way. For multiple options, // Read a single global option in a thread-safe way. For multiple options,
// use m_config_cache. The option must exist and match the provided type (the // use m_config_cache. The option must exist and match the provided type (the
// type is used as a sanity check only). Performs semi-expensive lookup. // type is used as a sanity check only). Performs semi-expensive lookup.
// Warning: new code must not use this.
void mp_read_option_raw(struct mpv_global *global, const char *name, void mp_read_option_raw(struct mpv_global *global, const char *name,
const struct m_option_type *type, void *dst); const struct m_option_type *type, void *dst);