Skip to content

Commit

Permalink
man3: fix description in lua_close.3
Browse files Browse the repository at this point in the history
`lua_close` [1] used description of `lua_checkstack` [2] by mistake.

1. https://www.lua.org/manual/5.1/manual.html#lua_close
1. https://www.lua.org/manual/5.1/manual.html#lua_checkstack
  • Loading branch information
ligurio committed Nov 18, 2023
1 parent b49fdc0 commit 9525c13
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions man3/lua_close.3
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,22 @@
.Os
.Sh NAME
.Nm lua_close
.Nd ensures that there are at least extra free stack slots in the stack, function indicator
.Nd destroys all objects and frees all dynamic memory, function indicator
.Bq -0, +0, -
.Sh SYNOPSIS
.In lua.h
.Ft void
.Fn lua_close "lua_State *L"
.Sh DESCRIPTION
.Fn lua_close
ensures that there are at least extra free stack slots in the stack.
It returns false if it cannot grow the stack to that size.
This function never shrinks the stack; if the stack is already larger than the
new size, it is left unchanged.
destroys all objects in the given Lua state (calling the corresponding
garbage-collection metamethods, if any) and frees all dynamic memory used by
this state.
On several platforms, you may not need to call this function, because all
resources are naturally released when the host program ends.
On the other hand, long-running programs, such as a daemon or a web server,
might need to release states as soon as they are not needed, to avoid growing
too large.
.Sh SEE ALSO
.Rs
.%A Roberto Ierusalimschy
Expand Down

0 comments on commit 9525c13

Please sign in to comment.