aboutsummaryrefslogtreecommitdiff
path: root/manual
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-10-30 10:18:54 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-10-30 10:18:54 -0300
commit94cbe4651156a84dd9114d7daaa61acd050adbe0 (patch)
tree38828b49afc061309c475c0ca6a05605ceefef1a /manual
parent69b71a69197de0cb6f7f58f5d7c55d9a9a6e529d (diff)
downloadlua-94cbe4651156a84dd9114d7daaa61acd050adbe0.tar.gz
lua-94cbe4651156a84dd9114d7daaa61acd050adbe0.tar.bz2
lua-94cbe4651156a84dd9114d7daaa61acd050adbe0.zip
Details
- small corrections in the manual - ldo.c: 'docall' -> 'ccall' ('docall' already used in 'lua.c') - comments
Diffstat (limited to 'manual')
-rw-r--r--manual/manual.of13
1 files changed, 10 insertions, 3 deletions
diff --git a/manual/manual.of b/manual/manual.of
index 86631bbc..606771f4 100644
--- a/manual/manual.of
+++ b/manual/manual.of
@@ -2516,7 +2516,8 @@ Lua's garbage collection can free or move internal memory
2516and then invalidate pointers to internal strings. 2516and then invalidate pointers to internal strings.
2517To allow a safe use of these pointers, 2517To allow a safe use of these pointers,
2518The API guarantees that any pointer to a string in a stack index 2518The API guarantees that any pointer to a string in a stack index
2519is valid while the value at that index is neither modified nor popped. 2519is valid while the string value at that index is not removed from the stack.
2520(It can be moved to another index, though.)
2520When the index is a pseudo-index (referring to an upvalue), 2521When the index is a pseudo-index (referring to an upvalue),
2521the pointer is valid while the corresponding call is active and 2522the pointer is valid while the corresponding call is active and
2522the corresponding upvalue is not modified. 2523the corresponding upvalue is not modified.
@@ -3744,10 +3745,13 @@ except that it allows the called function to yield @see{continuations}.
3744} 3745}
3745 3746
3746@APIEntry{void lua_pop (lua_State *L, int n);| 3747@APIEntry{void lua_pop (lua_State *L, int n);|
3747@apii{n,0,-} 3748@apii{n,0,e}
3748 3749
3749Pops @id{n} elements from the stack. 3750Pops @id{n} elements from the stack.
3750 3751
3752This function can run arbitrary code when removing an index
3753marked as to-be-closed from the stack.
3754
3751} 3755}
3752 3756
3753@APIEntry{void lua_pushboolean (lua_State *L, int b);| 3757@APIEntry{void lua_pushboolean (lua_State *L, int b);|
@@ -4227,7 +4231,7 @@ for the @Q{newindex} event @see{metatable}.
4227} 4231}
4228 4232
4229@APIEntry{void lua_settop (lua_State *L, int index);| 4233@APIEntry{void lua_settop (lua_State *L, int index);|
4230@apii{?,?,-} 4234@apii{?,?,e}
4231 4235
4232Accepts any index, @N{or 0}, 4236Accepts any index, @N{or 0},
4233and sets the stack top to this index. 4237and sets the stack top to this index.
@@ -4235,6 +4239,9 @@ If the new top is greater than the old one,
4235then the new elements are filled with @nil. 4239then the new elements are filled with @nil.
4236If @id{index} @N{is 0}, then all stack elements are removed. 4240If @id{index} @N{is 0}, then all stack elements are removed.
4237 4241
4242This function can run arbitrary code when removing an index
4243marked as to-be-closed from the stack.
4244
4238} 4245}
4239 4246
4240@APIEntry{void lua_setwarnf (lua_State *L, lua_WarnFunction f, void *ud);| 4247@APIEntry{void lua_setwarnf (lua_State *L, lua_WarnFunction f, void *ud);|