From e873d703e956d3e2e68b9e18562983b029b5c7a8 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Thu, 28 Jul 2011 11:07:47 +0300 Subject: 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. --- m_struct.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'm_struct.h') 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. -- cgit v1.2.3