LUA_REGISTER(3) | Library Functions Manual | LUA_REGISTER(3) |
lua_register
—
sets the C function as the new value of global name,
function indicator [-0, +0, e]
#include
<lua.h>
void
lua_register
(lua_State
*L, const char
*name, lua_CFunction
f);
lua_register
()
sets the C function f as the new value of global name.
It is defined as a macro:
#define lua_register(L,n,f) (lua_pushcfunction(L, f), lua_setglobal(L, n))
Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes, Lua 5.1 Reference Manual.
The lua_register
() manual page is based on
Lua Reference Manual 5.1 and was created by Sergey Bronnikov.
July 18, 2022 | Debian |