From dfcd561ba9087c2a62cb7034c5e661d0b57ad660 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Mon, 29 Nov 2021 14:45:56 +0100 Subject: lua: remove mp.suspend, resume and resume_all These functions were deprecated in v0.21.0 and no-ops since v0.23.0. The matching client API functions were removed in the previous commit. --- DOCS/man/javascript.rst | 6 ------ DOCS/man/lua.rst | 12 ------------ player/lua.c | 20 -------------------- player/lua/defaults.lua | 3 --- 4 files changed, 41 deletions(-) diff --git a/DOCS/man/javascript.rst b/DOCS/man/javascript.rst index e1b93d8204..a776cb32ea 100644 --- a/DOCS/man/javascript.rst +++ b/DOCS/man/javascript.rst @@ -73,12 +73,6 @@ Unsupported Lua APIs and their JS alternatives ``utils.to_string(v)`` see ``dump`` below. -``mp.suspend()`` JS: none (deprecated). - -``mp.resume()`` JS: none (deprecated). - -``mp.resume_all()`` JS: none (deprecated). - ``mp.get_next_timeout()`` see event loop below. ``mp.dispatch_events([allow_wait])`` see event loop below. diff --git a/DOCS/man/lua.rst b/DOCS/man/lua.rst index 29fc67b9c8..cdbe7498c2 100644 --- a/DOCS/man/lua.rst +++ b/DOCS/man/lua.rst @@ -527,18 +527,6 @@ Advanced mp functions These also live in the ``mp`` module, but are documented separately as they are useful only in special situations. -``mp.suspend()`` - This function has been deprecated in mpv 0.21.0 and does nothing starting - with mpv 0.23.0 (no replacement). - -``mp.resume()`` - This function has been deprecated in mpv 0.21.0 and does nothing starting - with mpv 0.23.0 (no replacement). - -``mp.resume_all()`` - This function has been deprecated in mpv 0.21.0 and does nothing starting - with mpv 0.23.0 (no replacement). - ``mp.get_wakeup_pipe()`` Calls ``mpv_get_wakeup_pipe()`` and returns the read end of the wakeup pipe. This is deprecated, but still works. (See ``client.h`` for details.) diff --git a/player/lua.c b/player/lua.c index bdb08e304a..64c5d33e6e 100644 --- a/player/lua.c +++ b/player/lua.c @@ -539,23 +539,6 @@ static int script_get_script_directory(lua_State *L) return 0; } -static int script_suspend(lua_State *L) -{ - struct script_ctx *ctx = get_ctx(L); - MP_ERR(ctx, "mp.suspend() is deprecated and does nothing.\n"); - return 0; -} - -static int script_resume(lua_State *L) -{ - return 0; -} - -static int script_resume_all(lua_State *L) -{ - return 0; -} - static void pushnode(lua_State *L, mpv_node *node); static int script_raw_wait_event(lua_State *L, void *tmp) @@ -1220,9 +1203,6 @@ struct fn_entry { static const struct fn_entry main_fns[] = { FN_ENTRY(log), - FN_ENTRY(suspend), - FN_ENTRY(resume), - FN_ENTRY(resume_all), AF_ENTRY(raw_wait_event), FN_ENTRY(request_event), FN_ENTRY(find_config_file), diff --git a/player/lua/defaults.lua b/player/lua/defaults.lua index de28409c0e..0643c0b1d9 100644 --- a/player/lua/defaults.lua +++ b/player/lua/defaults.lua @@ -542,9 +542,6 @@ function mp.dispatch_events(allow_wait) end end end - -- Resume playloop - important especially if an error happened while - -- suspended, and the error was handled, but no resume was done. - mp.resume_all() if allow_wait ~= true then return end -- cgit v1.2.3