> On 2008年9月15日 Brian Weed wrote: >> I'm looking for a way to get the source string of a function from Lua This question does come up occasionally: http://lua-users.org/lists/lua-l/1997-12/msg00017.html http://lua-users.org/lists/lua-l/1999-07/msg00146.html http://lua-users.org/lists/lua-l/2006-07/msg00257.html I've seen some JavaScript implementations store the full source of each function in memory like this. Another solution would be to store char indices, rather than just line indices, in the debug info with the file name (assuming the function was loaded from a file).