diff options
author | wm4 <wm4@nowhere> | 2020-02-16 23:03:14 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-02-16 23:03:14 +0100 |
commit | 249bb091d4880a564c00f8354111e12cfd0183a3 (patch) | |
tree | 1bfb92149a0baa20d9ee2590db862e09f31daf65 | |
parent | f2c7c641b38d060a7eea52a92bc0239f1603bffb (diff) | |
download | mpv-249bb091d4880a564c00f8354111e12cfd0183a3.tar.bz2 mpv-249bb091d4880a564c00f8354111e12cfd0183a3.tar.xz |
manpage: improve command_native_async description
-rw-r--r-- | DOCS/man/lua.rst | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/DOCS/man/lua.rst b/DOCS/man/lua.rst index a9c0e9423e..a9fc02ed44 100644 --- a/DOCS/man/lua.rst +++ b/DOCS/man/lua.rst @@ -165,12 +165,19 @@ The ``mp`` module is preloaded, although it can be loaded manually with ``mp.command_native_async(table [,fn])`` Like ``mp.command_native()``, but the command is ran asynchronously (as far - as possible), and upon completion, fn is called. fn has two arguments: - ``fn(success, result, error)``. ``success`` is always a Boolean and is true - if the command was successful, otherwise false. The second parameter is - the result value (can be nil) in case of success, nil otherwise (as returned - by ``mp.command_native()``). The third parameter is the error string in case - of an error, nil otherwise. + as possible), and upon completion, fn is called. fn has three arguments: + ``fn(success, result, error)``: + + ``success`` + Always a Boolean and is true if the command was successful, + otherwise false. + + ``result`` + The result value (can be nil) in case of success, nil otherwise (as + returned by ``mp.command_native()``). + + ``error`` + The error string in case of an error, nil otherwise. Returns a table with undefined contents, which can be used as argument for ``mp.abort_async_command``. |