[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Just checking a script syntax
- From: David Given <dg@...>
- Date: Tue, 25 Oct 2005 15:38:28 +0100
On Tuesday 25 October 2005 15:14, Jose Marin wrote:
> If I use luaL_loadstring, the string it's compiled,
> and the functions/global vars are inserted on the
> global environment.
> I don't wanna this.
I don't know luaL_loadstring --- do you mean luaL_loadbuffer? If so, it
shouldn't add anything to the environment (AFAIR) until the chunk that's
returned is actually executed.
OTOH, if you meant luaL_dostring, then that'll compile and then execute the
chunk, so yes, it'll modify its environment, which defaults to the global one.
But if you just want to do a syntax check you probably don't want to do this
(because the chunk may have side effects).
Alternatively, I could be completely misunderstanding you...
+- David Given --McQ-+ "I concluded from the beginning that this would be
| firstname.lastname@example.org | the end; and I am right, for it is not half over
| (email@example.com) | yet." --- Sir Boyle Roche
+- www.cowlark.com --+
Description: PGP signature