diff options
Diffstat (limited to 'm_option.h')
-rw-r--r-- | m_option.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/m_option.h b/m_option.h index ed2b30de75..05d5751ceb 100644 --- a/m_option.h +++ b/m_option.h @@ -493,6 +493,12 @@ struct m_option { */ const m_option_t* m_option_list_find(const m_option_t* list,const char* name); +static inline void *m_option_get_ptr(const struct m_option *opt, + void *optstruct) +{ + return opt->new ? (char *) optstruct + opt->offset : opt->p; +} + /// Helper to parse options, see \ref m_option_type::parse. inline static int m_option_parse(const m_option_t* opt,const char *name, const char *param, void* dst, int src) { |