Function 'warn' is vararg

Instead of a 'tocont' flag, the function 'warn' in Lua now receives all
message pieces as multiple arguments in a single call. Besides being
simpler to use, this implementation ensures that Lua code cannot create
unfinished warnings.
This commit is contained in:
Roberto Ierusalimschy committed 2019-06-04 11:22:21 -03:00
1 parent 514d942748
commit 14edd364c3
4 files changed
+43 -20

No files matched your search

+3 -5
View File
@@ -6326,12 +6326,10 @@ The current value of this variable is @St{Lua 5.4}.
}
@LibEntry{warn (message [, tocont])|
@LibEntry{warn (msg1, @Cdots)|
Emits a warning with the given message.
A message in a call with @id{tocont} true should be
continued in another call to this function.
The default for @id{tocont} is false.
Emits a warning with a message composed by the concatenation
of all its arguments (which should be strings).
}