Skip to content

Commit

Permalink
app_lua: docs - more details about lua_run() params
Browse files Browse the repository at this point in the history
(cherry picked from commit f1f6c30)
  • Loading branch information
miconda committed Aug 17, 2018
1 parent a7ba7ee commit 154fd39
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/modules/app_lua/doc/app_lua_admin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -333,24 +333,27 @@ if(!lua_dostring("sr.log([[err]], [[----------- Hello World from $fU\n]])"))

<section id="app_lua.f.lua_run">
<title>
<function moreinfo="none">lua_run(function, params)</function>
<function moreinfo="none">lua_run(func [, params])</function>
</title>
<para>
Execute the Lua function 'func' giving params as parameters. There
can be up to 3 string parameters. The function must exist in the
Execute the Lua function 'func' giving 'params' as parameters. There
can be up to 3 string parameters after 'func' (overall, max 4 params,
first is the function). The function must exist in the Lua
script loaded at startup via parameter 'load'. Parameters can be
strings with pseudo-variables that are evaluated at runtime.
</para>
<example>
<title><function>lua_run</function> usage</title>
<programlisting format="linespecific">
...
if(!lua_run("sr_append_fu_to_reply"))
{
if(!lua_run("sr_append_fu_to_reply")) {
xdbg("SCRIPT: failed to execute lua function!\n");
}
...
lua_run("lua_funcx", "$rU", "2");
lua_run("lua_funcx0");
lua_run("lua_funcx1", "$rU");
lua_run("lua_funcx2", "$rU", "2");
lua_run("lua_funcx3", "$rU", "2", "$si");
...
</programlisting>
</example>
Expand Down

0 comments on commit 154fd39

Please sign in to comment.