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