summaryrefslogtreecommitdiff
path: root/lua.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-04-04 11:45:26 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-04-04 11:45:26 -0300
commit5ca1075b714e825006e8ba4f8e7ea5544879bb41 (patch)
treead085afa58f29e8e96071ae88c1e6e1dd73e0750 /lua.h
parent38425e069243fe6d991f2e99b4bba192af3563c7 (diff)
downloadlua-github-5ca1075b714e825006e8ba4f8e7ea5544879bb41.tar.gz
Added field 'srclen' to structure 'lua_Debug'
This new field gets the length of 'source' in the same structure. Unlike the other strings in that structure, 'source' can be relatively large, and Lua already has its length readily available.
Diffstat (limited to 'lua.h')
-rw-r--r--lua.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lua.h b/lua.h
index 7c4a13bc..ec31c781 100644
--- a/lua.h
+++ b/lua.h
@@ -469,6 +469,7 @@ struct lua_Debug {
const char *namewhat; /* (n) 'global', 'local', 'field', 'method' */
const char *what; /* (S) 'Lua', 'C', 'main', 'tail' */
const char *source; /* (S) */
+ size_t srclen; /* (S) */
int currentline; /* (l) */
int linedefined; /* (S) */
int lastlinedefined; /* (S) */