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.
This commit is contained in:
Roberto Ierusalimschy
2019-04-04 11:45:26 -03:00
parent 38425e0692
commit 5ca1075b71
6 changed files with 31 additions and 20 deletions

View File

@@ -747,7 +747,7 @@ LUAI_FUNC void luaO_tostring (lua_State *L, TValue *obj);
LUAI_FUNC const char *luaO_pushvfstring (lua_State *L, const char *fmt,
va_list argp);
LUAI_FUNC const char *luaO_pushfstring (lua_State *L, const char *fmt, ...);
LUAI_FUNC void luaO_chunkid (char *out, const char *source, size_t len);
LUAI_FUNC void luaO_chunkid (char *out, const char *source, size_t srclen);
#endif