diff options
Diffstat (limited to 'manual')
-rw-r--r-- | manual/manual.of | 34 |
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}, | |||
2563 | and @Lid{luaL_tolstring} in the auxiliary library.) | 2563 | and @Lid{luaL_tolstring} in the auxiliary library.) |
2564 | 2564 | ||
2565 | In general, | 2565 | In general, |
2566 | Lua's garbage collection can free or move internal memory | 2566 | Lua's garbage collection can free or move memory |
2567 | and then invalidate pointers to internal strings. | 2567 | and then invalidate pointers to strings handled by a Lua state. |
2568 | To allow a safe use of these pointers, | 2568 | To allow a safe use of these pointers, |
2569 | the API guarantees that any pointer to a string in a stack index | 2569 | the API guarantees that any pointer to a string in a stack index |
2570 | is valid while the string value at that index is not removed from the stack. | 2570 | is 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 | |||
3158 | A @idx{__close} metamethod cannot yield | 3158 | A @idx{__close} metamethod cannot yield |
3159 | when called through this function. | 3159 | when 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}. | |||
3179 | If there is no such coroutine, | 3177 | If there is no such coroutine, |
3180 | this parameter can be @id{NULL}. | 3178 | this 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 | |||
4233 | This function is deprecated; | ||
4234 | it 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 | ||
4518 | Converts the Lua value at the given index to a @N{C string}. | 4506 | Converts the Lua value at the given index to a @N{C string}. |
4519 | If @id{len} is not @id{NULL}, | ||
4520 | it sets @T{*len} with the string length. | ||
4521 | The Lua value must be a string or a number; | 4507 | The Lua value must be a string or a number; |
4522 | otherwise, the function returns @id{NULL}. | 4508 | otherwise, the function returns @id{NULL}. |
4523 | If the value is a number, | 4509 | If 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} |
4527 | when @id{lua_tolstring} is applied to keys during a table traversal.) | 4513 | when @id{lua_tolstring} is applied to keys during a table traversal.) |
4528 | 4514 | ||
4529 | @id{lua_tolstring} returns a pointer | 4515 | If @id{len} is not @id{NULL}, |
4530 | to a string inside the Lua state @see{constchar}. | 4516 | the function sets @T{*len} with the string length. |
4531 | This string always has a zero (@Char{\0}) | 4517 | The returned @N{C string} always has a zero (@Char{\0}) |
4532 | after its last character (as @N{in C}), | 4518 | after its last character, |
4533 | but can contain other zeros in its body. | 4519 | but can contain other zeros in its body. |
4534 | 4520 | ||
4521 | The pointer returned by @id{lua_tolstring} | ||
4522 | may be invalidated by the garbage collector if the | ||
4523 | corresponding 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 | ||
9068 | After handling its options, @id{lua} runs the given @emph{script}. | 9057 | After handling its options, @id{lua} runs the given @emph{script}. |
9069 | When called without arguments, | 9058 | When 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{ |
9243 | The function @id{lua_resetthread} is deprecated; | ||
9244 | it is equivalent to @Lid{lua_closethread} with | ||
9245 | @id{from} being @id{NULL}. | ||
9254 | } | 9246 | } |
9255 | 9247 | ||
9256 | } | 9248 | } |