LUA_SETTABLE(3) | Library Functions Manual | LUA_SETTABLE(3) |
lua_settable
—
pops both the key and the value from the stack, function
indicator [-2, +0, e]
#include
<lua.h>
void
lua_settable
(lua_State
*L, int index);
lua_settable
()
does the equivalent to t[k] = v, where t is the value at the given valid
index, v is the value at the top of the stack, and k is the value just below
the top.
This function pops both the key and the value from the stack. As in Lua, this function may trigger a metamethod for the "newindex" event.
Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes, Lua 5.1 Reference Manual.
The lua_settable
() manual page is based on
Lua Reference Manual 5.1 and was created by Sergey Bronnikov.
July 15, 2022 | Debian |