aboutsummaryrefslogtreecommitdiff
path: root/manual
diff options
context:
space:
mode:
Diffstat (limited to 'manual')
-rw-r--r--manual/manual.of34
1 files changed, 20 insertions, 14 deletions
diff --git a/manual/manual.of b/manual/manual.of
index a441cea1..bb95148a 100644
--- a/manual/manual.of
+++ b/manual/manual.of
@@ -1428,7 +1428,7 @@ except inside nested functions.
1428A goto can jump to any visible label as long as it does not 1428A goto can jump to any visible label as long as it does not
1429enter into the scope of a local variable. 1429enter into the scope of a local variable.
1430A label should not be declared 1430A label should not be declared
1431where a label with the same name is visible, 1431where a previous label with the same name is visible,
1432even if this other label has been declared in an enclosing block. 1432even if this other label has been declared in an enclosing block.
1433 1433
1434The @Rw{break} statement terminates the execution of a 1434The @Rw{break} statement terminates the execution of a
@@ -3835,7 +3835,7 @@ This macro may evaluate its arguments more than once.
3835 3835
3836Converts the number at acceptable index @id{idx} to a string 3836Converts the number at acceptable index @id{idx} to a string
3837and puts the result in @id{buff}. 3837and puts the result in @id{buff}.
3838The buffer must have a size of at least @Lid{LUA_N2SBUFFSZ} bytes. 3838The buffer must have a size of at least @defid{LUA_N2SBUFFSZ} bytes.
3839The conversion follows a non-specified format @see{coercion}. 3839The conversion follows a non-specified format @see{coercion}.
3840The function returns the number of bytes written to the buffer 3840The function returns the number of bytes written to the buffer
3841(including the final zero), 3841(including the final zero),
@@ -3997,25 +3997,22 @@ Lua will call @id{falloc} before raising the error.
3997 3997
3998Pushes onto the stack a formatted string 3998Pushes onto the stack a formatted string
3999and returns a pointer to this string @see{constchar}. 3999and returns a pointer to this string @see{constchar}.
4000It is similar to the @ANSI{sprintf}, 4000The result is a copy of @id{fmt} with
4001but has two important differences. 4001each @emph{conversion specifier} replaced by its respective
4002First, 4002extra argument.
4003you do not have to allocate space for the result; 4003A conversion specifier can be
4004the result is a Lua string and Lua takes care of memory allocation
4005(and deallocation, through garbage collection).
4006Second,
4007the conversion specifiers are quite restricted.
4008There are no flags, widths, or precisions.
4009The conversion specifiers can only be
4010@Char{%%} (inserts the character @Char{%}), 4004@Char{%%} (inserts the character @Char{%}),
4011@Char{%s} (inserts a zero-terminated string, with no size restrictions), 4005@Char{%s} (inserts a zero-terminated string, with no size restrictions),
4012@Char{%f} (inserts a @Lid{lua_Number}), 4006@Char{%f} (inserts a @Lid{lua_Number}),
4013@Char{%I} (inserts a @Lid{lua_Integer}), 4007@Char{%I} (inserts a @Lid{lua_Integer}),
4014@Char{%p} (inserts a pointer), 4008@Char{%p} (inserts a void pointer),
4015@Char{%d} (inserts an @T{int}), 4009@Char{%d} (inserts an @T{int}),
4016@Char{%c} (inserts an @T{int} as a one-byte character), and 4010@Char{%c} (inserts an @T{int} as a one-byte character), and
4017@Char{%U} (inserts an @T{unsigned long} as a @x{UTF-8} byte sequence). 4011@Char{%U} (inserts an @T{unsigned long} as a @x{UTF-8} byte sequence).
4018 4012
4013Every occurrence of @Char{%} in the string @id{fmt}
4014must form a valid conversion specifier.
4015
4019} 4016}
4020 4017
4021@APIEntry{void lua_pushglobaltable (lua_State *L);| 4018@APIEntry{void lua_pushglobaltable (lua_State *L);|
@@ -4413,7 +4410,7 @@ for the @Q{newindex} event @see{metatable}.
4413@APIEntry{void lua_settop (lua_State *L, int index);| 4410@APIEntry{void lua_settop (lua_State *L, int index);|
4414@apii{?,?,e} 4411@apii{?,?,e}
4415 4412
4416Accepts any index, @N{or 0}, 4413Receives any acceptable stack index, @N{or 0},
4417and sets the stack top to this index. 4414and sets the stack top to this index.
4418If the new top is greater than the old one, 4415If the new top is greater than the old one,
4419then the new elements are filled with @nil. 4416then the new elements are filled with @nil.
@@ -9428,6 +9425,15 @@ Moreover, there were some changes in the parameters themselves.
9428@itemize{ 9425@itemize{
9429 9426
9430@item{ 9427@item{
9428In @Lid{lua_call} and related functions,
9429the maximum value for the number of required results
9430(@id{nresults}) is 250.
9431If you really need a larger value,
9432use @Lid{LUA_MULTRET} and then adjust the stack size.
9433Previously, this limit was unspecified.
9434}
9435
9436@item{
9431@Lid{lua_newstate} has a third parameter, 9437@Lid{lua_newstate} has a third parameter,
9432a seed for the hashing of strings. 9438a seed for the hashing of strings.
9433} 9439}