lua-users home
lua-l archive

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

>> The ldumplib library simply adds a function called "dump" that takes a Lua
>> function and converts it to a (binary) string identical to the contents of
>> a file created by luac.
>So this could be used by tests/save.lua to also save functions?

Yes, but you have to be careful to convert the string returned by "dump"
to a printable string, that is, escape all non printable characters.
Of course, gsub is your friend for this...