SYNOPSIS
string.dump(function)
DESCRIPTION
Returns a string containing a binary representation of the given function, so that a later loadstring
on this string returns a copy of the function. function must be a Lua function without upvalues.
RETURN VALUE
Returns a string.
EXAMPLE
>
>
>
>
>
function Greet(Name)
print("Hello " .. Name .. ".")
end
bytecode = string.dump(Greet)
(loadstring(bytecode))("World")
Hello World