lua-users home
lua-l archive

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


>> >Has anyone made a utility that can export Lua:s bytecode in text-form?
>
>What about runtime?
>Is there any means similar to Tcl's [info body $command]?

I don't know Tcl, but if you want to do this at runtime, then add luac/print.c
to your application. It shouldn't be too hard to this. If you want a string
instead of output to stdout, then you'll have to change all printfs in print.c
to write to a string (see ldumplib.c in 4.1a for a nice way to do this is to 
using the buffer facilities of lauxlib).
--lhf