[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Source code of functions defined in standard input
- From: Dirk Laurie <dirk.laurie@...>
- Date: Mon, 8 Apr 2013 19:35:05 +0200
`debug.info(fct).source` gives the actual source code if `fct`
was created by `load`, the string '=[C]' if it is a C API function,
and the filename containing the code if it is a Lua function,
in which case the code itself can be extracted by reading the
file and keeping the lines specified by `debug.info(fct).linedefined`
to `debug.info(fct).lastlinedefined`.
Except if the file is standard input.
Could one patch lua.c to include source code in this case?