LUA_CPCALL(3) | Library Functions Manual | LUA_CPCALL(3) |
lua_cpcall
— calls
the C function in protected mode, function indicator [-0, + (0|1),
-]
#include
<lua.h>
int
lua_cpcall
(lua_State
*L, lua_CFunction
func, void
*ud);
lua_cpcall
()
calls the C function func in protected mode.
func starts with only one element in its stack, a
light userdata containing ud.
In case of errors, lua_cpcall
() returns
the same error codes as lua_pcall(3), plus the error
object on the top of the stack; otherwise, it returns zero, and does not
change the stack. All values returned by func are
discarded.
Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes, Lua 5.1 Reference Manual.
The lua_cpcall
() manual page is based on
Lua Reference Manual 5.1 and was created by Sergey Bronnikov.
July 14, 2022 | Debian |