diff options
author | wm4 <wm4@nowhere> | 2020-03-22 19:42:59 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-03-22 19:42:59 +0100 |
commit | 37f441d61b1e2f92a31fe8f71dc965254d8e0d95 (patch) | |
tree | 6bccb926eb4c64dba4f4120010b9c932cbe06944 /player/lua.c | |
parent | 3fedf61532337e808587a2cd22cbbebad278be5f (diff) | |
download | mpv-37f441d61b1e2f92a31fe8f71dc965254d8e0d95.tar.bz2 mpv-37f441d61b1e2f92a31fe8f71dc965254d8e0d95.tar.xz |
lua: restore recent end-file event, and deprecate it
Lua changed behavior for this specific event. I considered the change
minor enough that it would not need to go through deprecation, but
someone hit it immediately and ask on the -dev channel.
It's probably better to restore the behavior. But mark it as deprecated,
since it's problematic (mismatch with the C API). Unfortunately, no
automatic warning is possible. (Or maybe it is, by playing sophisticated
Lua tricks such as setting a metatable and overriding indexing, but
let's not.)
Diffstat (limited to 'player/lua.c')
-rw-r--r-- | player/lua.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/player/lua.c b/player/lua.c index 58f8396d17..fca6791d48 100644 --- a/player/lua.c +++ b/player/lua.c @@ -498,7 +498,7 @@ static int script_resume_all(lua_State *L) static void pushnode(lua_State *L, mpv_node *node); -static int script_wait_event(lua_State *L) +static int script_raw_wait_event(lua_State *L) { struct script_ctx *ctx = get_ctx(L); @@ -1159,7 +1159,7 @@ static const struct fn_entry main_fns[] = { FN_ENTRY(suspend), FN_ENTRY(resume), FN_ENTRY(resume_all), - FN_ENTRY(wait_event), + FN_ENTRY(raw_wait_event), FN_ENTRY(request_event), FN_ENTRY(find_config_file), FN_ENTRY(get_script_directory), |