lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


`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?