diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-10-30 10:18:54 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-10-30 10:18:54 -0300 |
commit | 94cbe4651156a84dd9114d7daaa61acd050adbe0 (patch) | |
tree | 38828b49afc061309c475c0ca6a05605ceefef1a /manual | |
parent | 69b71a69197de0cb6f7f58f5d7c55d9a9a6e529d (diff) | |
download | lua-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.of | 13 |
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 | |||
2516 | and then invalidate pointers to internal strings. | 2516 | and then invalidate pointers to internal strings. |
2517 | To allow a safe use of these pointers, | 2517 | To allow a safe use of these pointers, |
2518 | The API guarantees that any pointer to a string in a stack index | 2518 | The API guarantees that any pointer to a string in a stack index |
2519 | is valid while the value at that index is neither modified nor popped. | 2519 | is valid while the string value at that index is not removed from the stack. |
2520 | (It can be moved to another index, though.) | ||
2520 | When the index is a pseudo-index (referring to an upvalue), | 2521 | When the index is a pseudo-index (referring to an upvalue), |
2521 | the pointer is valid while the corresponding call is active and | 2522 | the pointer is valid while the corresponding call is active and |
2522 | the corresponding upvalue is not modified. | 2523 | the 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 | ||
3749 | Pops @id{n} elements from the stack. | 3750 | Pops @id{n} elements from the stack. |
3750 | 3751 | ||
3752 | This function can run arbitrary code when removing an index | ||
3753 | marked 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 | ||
4232 | Accepts any index, @N{or 0}, | 4236 | Accepts any index, @N{or 0}, |
4233 | and sets the stack top to this index. | 4237 | and sets the stack top to this index. |
@@ -4235,6 +4239,9 @@ If the new top is greater than the old one, | |||
4235 | then the new elements are filled with @nil. | 4239 | then the new elements are filled with @nil. |
4236 | If @id{index} @N{is 0}, then all stack elements are removed. | 4240 | If @id{index} @N{is 0}, then all stack elements are removed. |
4237 | 4241 | ||
4242 | This function can run arbitrary code when removing an index | ||
4243 | marked 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);| |