LUAL_NEWSTATE(3) Library Functions Manual LUAL_NEWSTATE(3)

luaL_newstatecreates a new Lua state, function indicator [-0, +0, -]

#include <lauxlib.h>

lua_State *
luaL_newstate(void);

() creates a new Lua state. It calls lua_newstate(3) with an allocator based on the standard C realloc(3) function and then sets a panic function (see lua_atpanic(3)) that prints an error message to the standard error output in case of fatal errors.

Returns the new state, or NULL if there is a memory allocation error.

lua_atpanic(3), lua_newstate(3)

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

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

July 26, 2022 Debian