[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: setfenv/getfenv
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 12 Jan 2010 16:31:34 -0200
> > I think the following code does it (suggested by lhf):
>
> > code = "string with the code to be loaded"
> > f = loadstring("in ... do " .. code .. " end")
>
> This approach is not compatible with the case when "code" is in bytecode form.
>
> Is bytecode form considered a second class citizen? (Security issues aside.)
I would not call it a second class citizen just because we cannot use
it for this particular technique. For the usual case, loadin works
OK for bytecode form.
-- Roberto