LUA_NEWSTATE(3) | Library Functions Manual | LUA_NEWSTATE(3) |
lua_newstate
—
creates a new, independent state, function indicator [-0,
+0, -]
#include
<lua.h>
lua_State *
lua_newstate
(lua_Alloc
f, void *ud);
lua_newstate
()
creates a new, independent state. The argument f is
the allocator function; Lua does all memory allocation for this state
through this function. The second argument, ud, is an
opaque pointer that Lua simply passes to the allocator in every call.
Returns NULL
if cannot create the state
(due to lack of memory).
Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes, Lua 5.1 Reference Manual.
The lua_newstate
() manual page is based on
Lua Reference Manual 5.1 and was created by Sergey Bronnikov.
July 14, 2022 | Debian |