aboutsummaryrefslogtreecommitdiff
path: root/manual
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-09-20 15:56:39 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-09-20 15:56:39 -0300
commit20d42ccaaed9a84783d548d76633a5a38f0091f1 (patch)
tree4d0aae4dfac41956ac35a69ece27d042acd8f4f8 /manual
parent70d6975018c1f2b8ce34058a4d54a28a3fafca66 (diff)
downloadlua-20d42ccaaed9a84783d548d76633a5a38f0091f1.tar.gz
lua-20d42ccaaed9a84783d548d76633a5a38f0091f1.tar.bz2
lua-20d42ccaaed9a84783d548d76633a5a38f0091f1.zip
No errors in 'luaO_pushvfstring'
Any call to 'va_start' must have a corresponding call to 'va_end'; so, functions called between them (luaO_pushvfstring in particular) cannot raise errors.
Diffstat (limited to 'manual')
-rw-r--r--manual/manual.of25
1 files changed, 16 insertions, 9 deletions
diff --git a/manual/manual.of b/manual/manual.of
index f0a2ed94..1ac537f7 100644
--- a/manual/manual.of
+++ b/manual/manual.of
@@ -3974,7 +3974,7 @@ Lua will call @id{falloc} before raising the error.
3974 3974
3975 3975
3976@APIEntry{const char *lua_pushfstring (lua_State *L, const char *fmt, ...);| 3976@APIEntry{const char *lua_pushfstring (lua_State *L, const char *fmt, ...);|
3977@apii{0,1,v} 3977@apii{0,1,m}
3978 3978
3979Pushes onto the stack a formatted string 3979Pushes onto the stack a formatted string
3980and returns a pointer to this string @see{constchar}. 3980and returns a pointer to this string @see{constchar}.
@@ -3997,9 +3997,6 @@ The conversion specifiers can only be
3997@Char{%c} (inserts an @T{int} as a one-byte character), and 3997@Char{%c} (inserts an @T{int} as a one-byte character), and
3998@Char{%U} (inserts an @T{unsigned long} as a @x{UTF-8} byte sequence). 3998@Char{%U} (inserts an @T{unsigned long} as a @x{UTF-8} byte sequence).
3999 3999
4000This function may raise errors due to memory overflow
4001or an invalid conversion specifier.
4002
4003} 4000}
4004 4001
4005@APIEntry{void lua_pushglobaltable (lua_State *L);| 4002@APIEntry{void lua_pushglobaltable (lua_State *L);|
@@ -4104,10 +4101,14 @@ onto the stack.
4104const char *lua_pushvfstring (lua_State *L, 4101const char *lua_pushvfstring (lua_State *L,
4105 const char *fmt, 4102 const char *fmt,
4106 va_list argp);| 4103 va_list argp);|
4107@apii{0,1,v} 4104@apii{0,1,-}
4108 4105
4109Equivalent to @Lid{lua_pushfstring}, except that it receives a @id{va_list} 4106Equivalent to @Lid{lua_pushfstring},
4110instead of a variable number of arguments. 4107except that it receives a @id{va_list}
4108instead of a variable number of arguments,
4109and it does not raise errors.
4110Instead, in case of errors it pushes the error message
4111and returns @id{NULL}.
4111 4112
4112} 4113}
4113 4114
@@ -5636,6 +5637,7 @@ It is defined as the following macro:
5636} 5637}
5637It @N{returns 0} (@Lid{LUA_OK}) if there are no errors, 5638It @N{returns 0} (@Lid{LUA_OK}) if there are no errors,
5638or 1 in case of errors. 5639or 1 in case of errors.
5640(Except for out-of-memory errors, which are raised.)
5639 5641
5640} 5642}
5641 5643
@@ -5800,7 +5802,7 @@ The first line in the file is ignored if it starts with a @T{#}.
5800 5802
5801The string @id{mode} works as in the function @Lid{lua_load}. 5803The string @id{mode} works as in the function @Lid{lua_load}.
5802 5804
5803This function returns the same results as @Lid{lua_load} 5805This function returns the same results as @Lid{lua_load},
5804or @Lid{LUA_ERRFILE} for file-related errors. 5806or @Lid{LUA_ERRFILE} for file-related errors.
5805 5807
5806As @Lid{lua_load}, this function only loads the chunk; 5808As @Lid{lua_load}, this function only loads the chunk;
@@ -9260,7 +9262,7 @@ the script is compiled as a variadic function.
9260In interactive mode, 9262In interactive mode,
9261Lua repeatedly prompts and waits for a line. 9263Lua repeatedly prompts and waits for a line.
9262After reading a line, 9264After reading a line,
9263Lua first try to interpret the line as an expression. 9265Lua first tries to interpret the line as an expression.
9264If it succeeds, it prints its value. 9266If it succeeds, it prints its value.
9265Otherwise, it interprets the line as a chunk. 9267Otherwise, it interprets the line as a chunk.
9266If you write an incomplete chunk, 9268If you write an incomplete chunk,
@@ -9424,6 +9426,11 @@ instead, there is a new option @Lid{LUA_GCPARAM} to that end.
9424Moreover, there were some changes in the parameters themselves. 9426Moreover, there were some changes in the parameters themselves.
9425} 9427}
9426 9428
9429@item{
9430The function @Lid{lua_pushvfstring} now reports errors,
9431instead of raising them.
9432}
9433
9427} 9434}
9428 9435
9429} 9436}