aboutsummaryrefslogtreecommitdiff
path: root/manual
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-11-19 14:09:18 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-11-19 14:09:18 -0300
commit50c7c915ee2fa239043d5456237f5145d064089b (patch)
tree386e17e4baa154bb60dc54c1a00c751e3adedde9 /manual
parentb117bdb3448778d9e7f9a0302791e8ac3bb97ddd (diff)
downloadlua-50c7c915ee2fa239043d5456237f5145d064089b.tar.gz
lua-50c7c915ee2fa239043d5456237f5145d064089b.tar.bz2
lua-50c7c915ee2fa239043d5456237f5145d064089b.zip
Debug information about extra arguments from __call
'debug.getinfo' can return number of extra arguments added to a call by a chain of __call metavalues. That information is being used to improve error messages about errors in these extra arguments.
Diffstat (limited to 'manual')
-rw-r--r--manual/manual.of13
1 files changed, 11 insertions, 2 deletions
diff --git a/manual/manual.of b/manual/manual.of
index ce42ff51..a441cea1 100644
--- a/manual/manual.of
+++ b/manual/manual.of
@@ -4850,6 +4850,7 @@ typedef struct lua_Debug {
4850 unsigned char nups; /* (u) number of upvalues */ 4850 unsigned char nups; /* (u) number of upvalues */
4851 unsigned char nparams; /* (u) number of parameters */ 4851 unsigned char nparams; /* (u) number of parameters */
4852 char isvararg; /* (u) */ 4852 char isvararg; /* (u) */
4853 unsigned char extraargs; /* (t) number of extra arguments */
4853 char istailcall; /* (t) */ 4854 char istailcall; /* (t) */
4854 int ftransfer; /* (r) index of first value transferred */ 4855 int ftransfer; /* (r) index of first value transferred */
4855 int ntransfer; /* (r) number of transferred values */ 4856 int ntransfer; /* (r) number of transferred values */
@@ -4938,6 +4939,14 @@ true if this function invocation was called by a tail call.
4938In this case, the caller of this level is not in the stack. 4939In this case, the caller of this level is not in the stack.
4939} 4940}
4940 4941
4942@item{@id{extraargs}|
4943The number of extra arguments added by the call
4944to functions called through @idx{__call} metamethods.
4945(Each @idx{__call} metavalue adds a single extra argument,
4946the object being called,
4947but there may be a chain of @idx{__call} metavalues.)
4948}
4949
4941@item{@id{nups}| 4950@item{@id{nups}|
4942the number of upvalues of the function. 4951the number of upvalues of the function.
4943} 4952}
@@ -5045,7 +5054,7 @@ fills in the fields @id{source}, @id{short_src},
5045@id{linedefined}, @id{lastlinedefined}, and @id{what}; 5054@id{linedefined}, @id{lastlinedefined}, and @id{what};
5046} 5055}
5047 5056
5048@item{@Char{t}| fills in the field @id{istailcall}; 5057@item{@Char{t}| fills in the fields @id{istailcall} and @id{extraargs};
5049} 5058}
5050 5059
5051@item{@Char{u}| fills in the fields 5060@item{@Char{u}| fills in the fields
@@ -7993,7 +8002,7 @@ returns @fail plus the position of the first invalid byte.
7993 8002
7994@LibEntry{utf8.offset (s, n [, i])| 8003@LibEntry{utf8.offset (s, n [, i])|
7995 8004
7996Returns the the position of the @id{n}-th character of @id{s} 8005Returns the position of the @id{n}-th character of @id{s}
7997(counting from byte position @id{i}) as two integers: 8006(counting from byte position @id{i}) as two integers:
7998The index (in bytes) where its encoding starts and the 8007The index (in bytes) where its encoding starts and the
7999index (in bytes) where it ends. 8008index (in bytes) where it ends.