[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Eval a Lua expression
- From: "Javier Guerra" <javier@...>
- Date: Wed, 2 Apr 2008 17:09:43 -0500
On Wed, Apr 2, 2008 at 4:50 PM, Eugen-Andrei Gavriloaie
> On Apr 3, 2008, at 12:27 AM, Javier Guerra wrote:
> > no, each call to lua_evaluate_expression() would compile and execute a
> > new script in the same context. it won't 'accumulate' a long script.
> Hmmm, that is even worse unfortunately because I don't want to recompile
> the script over and over again. Some Lua variables may contain valuable
> informations and on the first call
it's not _re_compiling.
first you compile and run your config, that sets one or more 'global'
vars with your data. then you compile and run several *very* short
scripts, each one returns one or a few datums to the stack, where your
C code can easily fetch it/them.