From e00aad18cb76d39cc520526cece1505c63a8afe0 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 13 Jun 2014 02:11:39 +0200 Subject: command: redo the property type Instead of absuing m_option to store the property list, introduce a separate type for properties. m_option is still used to handle data types. The property declaration itself now never contains the option type, and instead it's always queried with M_PROPERTY_GET_TYPE. (This was already done with some properties, now all properties use it.) This also fixes that the function signatures did not match the function type with which these functions were called. They were called as: int (*)(const m_option_t*, int, void*, void*) but the actual function signatures were: int (*)(m_option_t*, int, void*, MPContext *) Two arguments were mismatched. This adds one line per property implementation. With additional the reordering of the parameters, this makes most of the changes in this commit. --- player/command.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'player/command.h') diff --git a/player/command.h b/player/command.h index 7ceeda22ff..846067b3bf 100644 --- a/player/command.h +++ b/player/command.h @@ -33,7 +33,7 @@ void property_print_help(struct mp_log *log); int mp_property_do(const char* name, int action, void* val, struct MPContext *mpctx); -const struct m_option *mp_get_property_list(void); +const struct m_property *mp_get_property_list(void); int mp_find_property_index(const char *property); void mp_notify(struct MPContext *mpctx, int event, void *arg); -- cgit v1.2.3