diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-03-10 01:46:46 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-03-10 01:50:55 +0200 |
commit | e74708f6194ef0af2bdf37e857ed232027fa46ba (patch) | |
tree | f7b53476abeb1cc8ccbe1c49113e9722c51b7800 /m_option.h | |
parent | 2ad00b5319603b22f9b0858bb14d016f673157cb (diff) | |
parent | cb8796857c8bd851e3b97d729af149e3f003b851 (diff) | |
download | mpv-e74708f6194ef0af2bdf37e857ed232027fa46ba.tar.bz2 mpv-e74708f6194ef0af2bdf37e857ed232027fa46ba.tar.xz |
Merge svn changes up to r30748
Diffstat (limited to 'm_option.h')
-rw-r--r-- | m_option.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/m_option.h b/m_option.h index d66f670d2a..3ce842e825 100644 --- a/m_option.h +++ b/m_option.h @@ -69,7 +69,7 @@ extern const m_option_type_t m_option_type_func; typedef void (*m_opt_default_func_t)(const m_option_t *, const char*); /// Callback used by m_option_type_func_full options. -typedef int (*m_opt_func_full_t)(const m_option_t *, const char *, char *); +typedef int (*m_opt_func_full_t)(const m_option_t *, const char *, const char *); /// Callback used by m_option_type_func_param options. typedef int (*m_opt_func_param_t)(const m_option_t *, const char *); @@ -199,9 +199,9 @@ extern const m_obj_params_t m_span_params_def; /// Option type description struct m_option_type { - char* name; + const char* name; /// Syntax description, etc - char* comments; + const char* comments; /// Size needed for the data. unsigned int size; /// See \ref OptionTypeFlags. @@ -219,7 +219,7 @@ struct m_option_type { * \return On error a negative value is returned, on success the number of arguments * consumed. For details see \ref OptionParserReturn. */ - int (*parse)(const m_option_t* opt,const char *name, char *param, void* dst, int src); + int (*parse)(const m_option_t* opt,const char *name, const char *param, void* dst, int src); /// Print back a value in string form. /** \param opt The option to print. @@ -242,21 +242,21 @@ struct m_option_type { * \param dst Pointer to the destination memory. * \param src Pointer to the source memory. */ - void (*save)(const m_option_t* opt,void* dst, void* src); + void (*save)(const m_option_t* opt,void* dst, const void* src); /// Set the value in the program (dst) from a save slot. /** \param opt The option to copy. * \param dst Pointer to the destination memory. * \param src Pointer to the source memory. */ - void (*set)(const m_option_t* opt,void* dst, void* src); + void (*set)(const m_option_t* opt,void* dst, const void* src); /// Copy the data between two save slots. If NULL and size is > 0 a memcpy will be used. /** \param opt The option to copy. * \param dst Pointer to the destination memory. * \param src Pointer to the source memory. */ - void (*copy)(const m_option_t* opt,void* dst, void* src); + void (*copy)(const m_option_t* opt,void* dst, const void* src); //@} /// Free the data allocated for a save slot. @@ -488,7 +488,7 @@ const m_option_t* m_option_list_find(const m_option_t* list,const char* name); /// Helper to parse options, see \ref m_option_type::parse. inline static int -m_option_parse(const m_option_t* opt,const char *name, char *param, void* dst, int src) { +m_option_parse(const m_option_t* opt,const char *name, const char *param, void* dst, int src) { return opt->type->parse(opt,name,param,dst,src); } @@ -503,7 +503,7 @@ m_option_print(const m_option_t* opt, const void* val_ptr) { /// Helper around \ref m_option_type::copy. inline static void -m_option_copy(const m_option_t* opt,void* dst, void* src) { +m_option_copy(const m_option_t* opt,void* dst, const void* src) { if(opt->type->copy) opt->type->copy(opt,dst,src); else if(opt->type->size > 0) |