[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: loadstring vs load
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 8 Dec 2010 10:26:15 -0200
> Note that load(s), unlike loadstring(s), does not accept binary strings.
> As binary code is potentially unsecure, this seems good. You still can
> make 'load' accept binary code supplying a third 'mode' argument.
Correction: the default for 'load' is to accept binary strings. (Not
to accept would be better, but it seemed a small gain for
the incompatibility.) So, 'load(s)' is exactly equivalent to
'loadstring(s)'.
(Actually, the reverse is also true in the current implementation.
loadstring works with function arguments ;)
-- Roberto