This commit is contained in:
Roberto I
2025-08-09 15:08:53 -03:00
parent 8fddca81e7
commit 5b179eaf6a
5 changed files with 51 additions and 28 deletions

View File

@@ -127,7 +127,8 @@ strings can contain any 8-bit value,
including @x{embedded zeros} (@Char{\0}).
Lua is also encoding-agnostic;
it makes no assumptions about the contents of a string.
The length of any string in Lua must fit in a Lua integer.
The length of any string in Lua must fit in a Lua integer,
and the string plus a small header must fit in @id{size_t}.
Lua can call (and manipulate) functions written in Lua and
functions written in C @see{functioncall}.
@@ -1555,7 +1556,8 @@ It has the following syntax:
exp @bnfter{,} exp @bnfopt{@bnfter{,} exp} @Rw{do} block @Rw{end}}
}
The given identifier (@bnfNter{Name}) defines the control variable,
which is a new read-only variable local to the loop body (@emph{block}).
which is a new read-only (@id{const}) variable local to the loop body
(@emph{block}).
The loop starts by evaluating once the three control expressions.
Their values are called respectively
@@ -1610,7 +1612,7 @@ works as follows.
The names @rep{var_i} declare loop variables local to the loop body.
The first of these variables is the @emph{control variable},
which is a read-only variable.
which is a read-only (@id{const}) variable.
The loop starts by evaluating @rep{explist}
to produce four values:
@@ -4083,7 +4085,7 @@ Lua will call @id{falloc} before raising the error.
@APIEntry{const char *lua_pushfstring (lua_State *L, const char *fmt, ...);|
@apii{0,1,m}
@apii{0,1,v}
Pushes onto the stack a formatted string
and returns a pointer to this string @see{constchar}.
@@ -4103,6 +4105,9 @@ A conversion specifier (and its corresponding extra argument) can be
Every occurrence of @Char{%} in the string @id{fmt}
must form a valid conversion specifier.
Besides memory allocation errors,
this function may raise an error if the resulting string is too large.
}
@APIEntry{void lua_pushglobaltable (lua_State *L);|
@@ -4135,7 +4140,7 @@ light userdata with the same @N{C address}.
}
@APIEntry{const char *lua_pushliteral (lua_State *L, const char *s);|
@apii{0,1,m}
@apii{0,1,v}
This macro is equivalent to @Lid{lua_pushstring},
but should be used only when @id{s} is a literal string.
@@ -4144,7 +4149,7 @@ but should be used only when @id{s} is a literal string.
}
@APIEntry{const char *lua_pushlstring (lua_State *L, const char *s, size_t len);|
@apii{0,1,m}
@apii{0,1,v}
Pushes the string pointed to by @id{s} with size @id{len}
onto the stack.
@@ -4156,6 +4161,9 @@ including @x{embedded zeros}.
Returns a pointer to the internal copy of the string @see{constchar}.
Besides memory allocation errors,
this function may raise an error if the string is too large.
}
@APIEntry{void lua_pushnil (lua_State *L);|
@@ -5015,8 +5023,8 @@ then @id{name} is set to @id{NULL}.
@item{@id{namewhat}|
explains the @T{name} field.
The value of @T{namewhat} can be
@T{"global"}, @T{"local"}, @T{"method"},
@T{"field"}, @T{"upvalue"}, or @T{""} (the empty string),
@T{"global"}, @T{"local"}, @T{"upvalue"},
@T{"field"}, @T{""} (the empty string), plus some other options,
according to how the function was called.
(Lua uses the empty string when no other option seems to apply.)
}
@@ -6571,7 +6579,7 @@ The call always returns the previous value of the parameter.
If the call does not give a new value,
the value is left unchanged.
Lua rounds these values before storing them;
Lua stores these values in a compressed format,
so, the value returned as the previous value may not be
exactly the last value set.
}
@@ -6585,10 +6593,10 @@ This function should not be called by a finalizer.
}
@LibEntry{dofile ([filename])|
Opens the named file and executes its content as a Lua chunk.
Opens the named file and executes its content as a Lua chunk,
returning all values returned by the chunk.
When called without arguments,
@id{dofile} executes the content of the standard input (@id{stdin}).
Returns all values returned by the chunk.
In case of errors, @id{dofile} propagates the error
to its caller.
(That is, @id{dofile} does not run in protected mode.)
@@ -6960,7 +6968,7 @@ in case of error
(either the original error that stopped the coroutine or
errors in closing methods),
this function returns @false plus the error object;
otherwise ir returns @true.
otherwise it returns @true.
}