LUA_TOCFUNCTION(3) Library Functions Manual LUA_TOCFUNCTION(3)

lua_tocfunctionconverts a value to a C function, function indicator [-0, +0, -]

#include <lua.h>

lua_CFunction
lua_tocfunction(lua_State *L, int index);

() converts a value at the given acceptable index to a C function.

That value must be a C function; otherwise, returns NULL.

Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes, Lua 5.1 Reference Manual.

The lua_tocfunction() manual page is based on Lua Reference Manual 5.1 and was created by Sergey Bronnikov.

July 14, 2022 Debian