commit f66ac9d1d7d92764917733c4416e0dbe4620b4a5 from: Sergey Bronnikov date: Wed Jul 27 06:59:11 2022 UTC man3: luaL_newstate.3 commit - c8b5c9fc4857cc0377de44274ebf965ed5091d4b commit + f66ac9d1d7d92764917733c4416e0dbe4620b4a5 blob - /dev/null blob + 4dd1f466285d90fc1b8c24a8ad492d6b19064bf0 (mode 644) --- /dev/null +++ man3/luaL_newstate.3 @@ -0,0 +1,29 @@ +.Dd $Mdocdate: July 26 2022 $ +.Dt LUAL_NEWSTATE 3 +.Os +.Sh NAME +.Nm luaL_newstate +.Nd creates a new Lua state +.Sh SYNOPSIS +.In lauxlib.h +.Ft lua_State * +.Fn luaL_newstate "void" +.Sh DESCRIPTION +.Fn luaL_newstate +creates a new Lua state. +It calls +.Xr lua_newstate 3 +with an allocator based on the standard C +.Xr realloc 3 +function and then sets a panic function +.Pq see Xr lua_atpanic 3 +that prints an error message to the standard error output in case of fatal +errors. +.Sh RETURN VALUES +Returns the new state, or +.Dv NULL +if there is a memory allocation error. +.Sh HISTORY +The +.Fn luaL_newstate +manual page was written by Sergey Bronnikov.