diff options
author | Uoti Urpala <uau@mplayer2.org> | 2011-07-28 11:07:47 +0300 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2011-07-29 05:50:38 +0300 |
commit | e873d703e956d3e2e68b9e18562983b029b5c7a8 (patch) | |
tree | 44a2c48ae4e94bd580ffd5833cd71a037af36043 /m_struct.h | |
parent | d8374376c0d46ffab88b96eb32b52621c34f562c (diff) |
options: change option parsing to use bstr
Using bstr allows simpler parsing code, especially because it avoids
the need to modify or copy strings just to terminate extracted
substrings.
Diffstat (limited to 'm_struct.h')
-rw-r--r-- | m_struct.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/m_struct.h b/m_struct.h index bcf09dc86f..79c7c24f2f 100644 --- a/m_struct.h +++ b/m_struct.h @@ -19,6 +19,8 @@ #ifndef MPLAYER_M_STRUCT_H #define MPLAYER_M_STRUCT_H +#include "bstr.h" + /// \defgroup OptionsStruct Options struct /// \ingroup Options /// An API to manipulate structs using m_option. @@ -87,8 +89,8 @@ m_struct_alloc(const m_struct_t* st); * \param param New value of the field. * \return 0 on error, 1 on success. */ -int -m_struct_set(const m_struct_t* st, void* obj, const char* field, const char* param); +int m_struct_set(const m_struct_t *st, void *obj, const char *field, + struct bstr param); /// Reset a field (or all if field == NULL) to defaults. /** \param st Struct definition. |