aboutsummaryrefslogtreecommitdiff
path: root/manual
diff options
context:
space:
mode:
Diffstat (limited to 'manual')
-rw-r--r--manual/manual.of34
1 files changed, 13 insertions, 21 deletions
diff --git a/manual/manual.of b/manual/manual.of
index 9ca28aee..263ced72 100644
--- a/manual/manual.of
+++ b/manual/manual.of
@@ -2563,8 +2563,8 @@ See also @Lid{luaL_checklstring}, @Lid{luaL_checkstring},
2563and @Lid{luaL_tolstring} in the auxiliary library.) 2563and @Lid{luaL_tolstring} in the auxiliary library.)
2564 2564
2565In general, 2565In general,
2566Lua's garbage collection can free or move internal memory 2566Lua's garbage collection can free or move memory
2567and then invalidate pointers to internal strings. 2567and then invalidate pointers to strings handled by a Lua state.
2568To allow a safe use of these pointers, 2568To allow a safe use of these pointers,
2569the API guarantees that any pointer to a string in a stack index 2569the API guarantees that any pointer to a string in a stack index
2570is valid while the string value at that index is not removed from the stack. 2570is valid while the string value at that index is not removed from the stack.
@@ -3158,8 +3158,6 @@ The index must be the last index previously marked to be closed
3158A @idx{__close} metamethod cannot yield 3158A @idx{__close} metamethod cannot yield
3159when called through this function. 3159when called through this function.
3160 3160
3161(This function was introduced in @N{release 5.4.3}.)
3162
3163} 3161}
3164 3162
3165@APIEntry{int lua_closethread (lua_State *L, lua_State *from);| 3163@APIEntry{int lua_closethread (lua_State *L, lua_State *from);|
@@ -3179,8 +3177,6 @@ The parameter @id{from} represents the coroutine that is resetting @id{L}.
3179If there is no such coroutine, 3177If there is no such coroutine,
3180this parameter can be @id{NULL}. 3178this parameter can be @id{NULL}.
3181 3179
3182(This function was introduced in @N{release 5.4.6}.)
3183
3184} 3180}
3185 3181
3186@APIEntry{int lua_compare (lua_State *L, int index1, int index2, int op);| 3182@APIEntry{int lua_compare (lua_State *L, int index1, int index2, int op);|
@@ -4227,14 +4223,6 @@ and then pops the top element.
4227 4223
4228} 4224}
4229 4225
4230@APIEntry{int lua_resetthread (lua_State *L);|
4231@apii{0,?,-}
4232
4233This function is deprecated;
4234it is equivalent to @Lid{lua_closethread} with
4235@id{from} being @id{NULL}.
4236
4237}
4238 4226
4239@APIEntry{int lua_resume (lua_State *L, lua_State *from, int nargs, 4227@APIEntry{int lua_resume (lua_State *L, lua_State *from, int nargs,
4240 int *nresults);| 4228 int *nresults);|
@@ -4516,8 +4504,6 @@ indicates whether the operation succeeded.
4516@apii{0,0,m} 4504@apii{0,0,m}
4517 4505
4518Converts the Lua value at the given index to a @N{C string}. 4506Converts the Lua value at the given index to a @N{C string}.
4519If @id{len} is not @id{NULL},
4520it sets @T{*len} with the string length.
4521The Lua value must be a string or a number; 4507The Lua value must be a string or a number;
4522otherwise, the function returns @id{NULL}. 4508otherwise, the function returns @id{NULL}.
4523If the value is a number, 4509If the value is a number,
@@ -4526,12 +4512,16 @@ then @id{lua_tolstring} also
4526(This change confuses @Lid{lua_next} 4512(This change confuses @Lid{lua_next}
4527when @id{lua_tolstring} is applied to keys during a table traversal.) 4513when @id{lua_tolstring} is applied to keys during a table traversal.)
4528 4514
4529@id{lua_tolstring} returns a pointer 4515If @id{len} is not @id{NULL},
4530to a string inside the Lua state @see{constchar}. 4516the function sets @T{*len} with the string length.
4531This string always has a zero (@Char{\0}) 4517The returned @N{C string} always has a zero (@Char{\0})
4532after its last character (as @N{in C}), 4518after its last character,
4533but can contain other zeros in its body. 4519but can contain other zeros in its body.
4534 4520
4521The pointer returned by @id{lua_tolstring}
4522may be invalidated by the garbage collector if the
4523corresponding Lua value is removed from the stack @see{constchar}.
4524
4535} 4525}
4536 4526
4537@APIEntry{lua_Number lua_tonumber (lua_State *L, int index);| 4527@APIEntry{lua_Number lua_tonumber (lua_State *L, int index);|
@@ -9063,7 +9053,6 @@ The options are:
9063@item{@T{--}| stop handling options;} 9053@item{@T{--}| stop handling options;}
9064@item{@T{-}| execute @id{stdin} as a file and stop handling options.} 9054@item{@T{-}| execute @id{stdin} as a file and stop handling options.}
9065} 9055}
9066(The form @T{-l @rep{g=mod}} was introduced in @N{release 5.4.4}.)
9067 9056
9068After handling its options, @id{lua} runs the given @emph{script}. 9057After handling its options, @id{lua} runs the given @emph{script}.
9069When called without arguments, 9058When called without arguments,
@@ -9251,6 +9240,9 @@ declare a local variable with the same name in the loop body.
9251@itemize{ 9240@itemize{
9252 9241
9253@item{ 9242@item{
9243The function @id{lua_resetthread} is deprecated;
9244it is equivalent to @Lid{lua_closethread} with
9245@id{from} being @id{NULL}.
9254} 9246}
9255 9247
9256} 9248}