diff options
author | wm4 <wm4@nowhere> | 2014-06-13 02:11:39 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-06-13 02:11:39 +0200 |
commit | e00aad18cb76d39cc520526cece1505c63a8afe0 (patch) | |
tree | 2c75ce913dd360f860713fc1937a8e6380b9a091 /player/lua.c | |
parent | 6a4a5595d8d2a17188cdea64dfdfceed88d1905a (diff) | |
download | mpv-e00aad18cb76d39cc520526cece1505c63a8afe0.tar.bz2 mpv-e00aad18cb76d39cc520526cece1505c63a8afe0.tar.xz |
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.
Diffstat (limited to 'player/lua.c')
-rw-r--r-- | player/lua.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/player/lua.c b/player/lua.c index 1da26f9f2b..ab00c58c68 100644 --- a/player/lua.c +++ b/player/lua.c @@ -692,7 +692,7 @@ static int script_set_property_native(lua_State *L) static int script_property_list(lua_State *L) { - const struct m_option *props = mp_get_property_list(); + const struct m_property *props = mp_get_property_list(); lua_newtable(L); for (int i = 0; props[i].name; i++) { lua_pushinteger(L, i + 1); |