lua-users home
lua-l archive

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


> The byte-code string.dump() generates seems to contain a copy of the
> text of the source passed to loadstring. I notice that neither luac or
> luac.lua seem to do this.

loadstring accepts an optional second argument that is the 'chunkname'.
If this argument is not present, loadstring uses the string itself and
so you get a copy of the source in the bytecode.

If you do not want this, call loadstring(s,"(noname)") or something.