Roberto Ierusalimschy пре 4 година
родитељ
комит
fbaf040f5e
1 измењених фајлова са 9 додато и 6 уклоњено
  1. 9 6
      manual/manual.of

+ 9 - 6
manual/manual.of

@@ -2441,7 +2441,8 @@ to ensure that the stack has enough space for pushing new elements.
 
 
 Whenever Lua calls C,
 Whenever Lua calls C,
 it ensures that the stack has space for
 it ensures that the stack has space for
-at least @defid{LUA_MINSTACK} extra slots.
+at least @defid{LUA_MINSTACK} extra elements;
+that is, you can safely push up to @id{LUA_MINSTACK} values into it.
 @id{LUA_MINSTACK} is defined as 20,
 @id{LUA_MINSTACK} is defined as 20,
 so that usually you do not have to worry about stack space
 so that usually you do not have to worry about stack space
 unless your code has loops pushing elements onto the stack.
 unless your code has loops pushing elements onto the stack.
@@ -3061,7 +3062,7 @@ static int foo (lua_State *L) {
 @APIEntry{int lua_checkstack (lua_State *L, int n);|
 @APIEntry{int lua_checkstack (lua_State *L, int n);|
 @apii{0,0,-}
 @apii{0,0,-}
 
 
-Ensures that the stack has space for at least @id{n} extra slots,
+Ensures that the stack has space for at least @id{n} extra elements,
 that is, that you can safely push up to @id{n} values into it.
 that is, that you can safely push up to @id{n} values into it.
 It returns false if it cannot fulfill the request,
 It returns false if it cannot fulfill the request,
 either because it would cause the stack
 either because it would cause the stack
@@ -3069,7 +3070,7 @@ to be greater than a fixed maximum size
 (typically at least several thousand elements) or
 (typically at least several thousand elements) or
 because it cannot allocate memory for the extra space.
 because it cannot allocate memory for the extra space.
 This function never shrinks the stack;
 This function never shrinks the stack;
-if the stack already has space for the extra slots,
+if the stack already has space for the extra elements,
 it is left unchanged.
 it is left unchanged.
 
 
 }
 }
@@ -6313,9 +6314,11 @@ It may be the string @St{b} (only @x{binary chunk}s),
 or @St{bt} (both binary and text).
 or @St{bt} (both binary and text).
 The default is @St{bt}.
 The default is @St{bt}.
 
 
-Lua does not check the consistency of binary chunks.
-Maliciously crafted binary chunks can crash
-the interpreter.
+It is safe to load malformed binary chunks;
+@id{load} signals an appropriate error.
+However,
+Lua does not check the consistency of the code inside binary chunks;
+running maliciously crafted bytecode can crash the interpreter.
 
 
 }
 }