[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Re-calling lua_loadbuffer
- From: "Chris Percival" <cpercival@...>
- Date: Mon, 11 Feb 2002 08:57:11 -0000
Great, thanks!
Chris Percival
Software Engineer
Interaxis Computing Ltd.
DDI: +44 (0)1249 700072
http://www.interaxis.co.uk/
> -----Original Message-----
> From: owner-lua-l@tecgraf.puc-rio.br
> [mailto:owner-lua-l@tecgraf.puc-rio.br]On Behalf Of Luiz Henrique de
> Figueiredo
> Sent: 11 February 2002 00:10
> To: Multiple recipients of list
> Subject: Re: Re-calling lua_loadbuffer
>
>
> >I have changed my lua v4.0 so I can use lua_loadbuffer (was
> parse_buffer).
> >What happens if I call this function, change the script in the passed
> >buffer, and then call it again? Is that allowed?
>
> Yes, it's allowed. Every time you call lua_loadbuffer, a new function
> corresponding to the compiled script in the buffer is left on the stack.
>
> >Would then calling lua_dobuffer do the second loaded scipt, or not?
>
> After lua_loadbuffer you want to call lua_call not lua_dobuffer.
> lua_dobuffer is essentially lua_loadbuffer followed by lua_call:
>
> --lhf