aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-09-25 10:49:29 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-09-25 10:49:29 -0300
commitfbaf040f5effae90214887d10bfac710b836f281 (patch)
treefcf25185e1bb29d27ea22f82489f70e76547c67d
parente51564d1bee5aa8b411328d7d3d75906dfc0a260 (diff)
downloadlua-fbaf040f5effae90214887d10bfac710b836f281.tar.gz
lua-fbaf040f5effae90214887d10bfac710b836f281.tar.bz2
lua-fbaf040f5effae90214887d10bfac710b836f281.zip
Details in the manual
-rw-r--r--manual/manual.of15
1 files changed, 9 insertions, 6 deletions
diff --git a/manual/manual.of b/manual/manual.of
index ff891399..8b34b5bd 100644
--- a/manual/manual.of
+++ b/manual/manual.of
@@ -2441,7 +2441,8 @@ to ensure that the stack has enough space for pushing new elements.
2441 2441
2442Whenever Lua calls C, 2442Whenever Lua calls C,
2443it ensures that the stack has space for 2443it ensures that the stack has space for
2444at least @defid{LUA_MINSTACK} extra slots. 2444at least @defid{LUA_MINSTACK} extra elements;
2445that is, you can safely push up to @id{LUA_MINSTACK} values into it.
2445@id{LUA_MINSTACK} is defined as 20, 2446@id{LUA_MINSTACK} is defined as 20,
2446so that usually you do not have to worry about stack space 2447so that usually you do not have to worry about stack space
2447unless your code has loops pushing elements onto the stack. 2448unless your code has loops pushing elements onto the stack.
@@ -3061,7 +3062,7 @@ static int foo (lua_State *L) {
3061@APIEntry{int lua_checkstack (lua_State *L, int n);| 3062@APIEntry{int lua_checkstack (lua_State *L, int n);|
3062@apii{0,0,-} 3063@apii{0,0,-}
3063 3064
3064Ensures that the stack has space for at least @id{n} extra slots, 3065Ensures that the stack has space for at least @id{n} extra elements,
3065that is, that you can safely push up to @id{n} values into it. 3066that is, that you can safely push up to @id{n} values into it.
3066It returns false if it cannot fulfill the request, 3067It returns false if it cannot fulfill the request,
3067either because it would cause the stack 3068either because it would cause the stack
@@ -3069,7 +3070,7 @@ to be greater than a fixed maximum size
3069(typically at least several thousand elements) or 3070(typically at least several thousand elements) or
3070because it cannot allocate memory for the extra space. 3071because it cannot allocate memory for the extra space.
3071This function never shrinks the stack; 3072This function never shrinks the stack;
3072if the stack already has space for the extra slots, 3073if the stack already has space for the extra elements,
3073it is left unchanged. 3074it is left unchanged.
3074 3075
3075} 3076}
@@ -6313,9 +6314,11 @@ It may be the string @St{b} (only @x{binary chunk}s),
6313or @St{bt} (both binary and text). 6314or @St{bt} (both binary and text).
6314The default is @St{bt}. 6315The default is @St{bt}.
6315 6316
6316Lua does not check the consistency of binary chunks. 6317It is safe to load malformed binary chunks;
6317Maliciously crafted binary chunks can crash 6318@id{load} signals an appropriate error.
6318the interpreter. 6319However,
6320Lua does not check the consistency of the code inside binary chunks;
6321running maliciously crafted bytecode can crash the interpreter.
6319 6322
6320} 6323}
6321 6324