[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: dofile() limits...
- From: "Mauro Vezzosi"<mvezzosi@...>
- Date: Mon, 28 Aug 2000 17:18:43 +0200
> Luiz Henrique de Figueiredo wrote:
> > >Is there some limit that we aren't aware of? Stacks,
> > >global namespaces, etc.?
> > There are no limits on the number of times dofile may
> > be executed.
> As a side note to the above, although it looks like you can call
> as many times as you want sequentially, I think there is a potential
> on the number of *nested* dofile() calls.
Yes, it's right. And Lua can also go out of C stack space (see "char
> During the time that do_main() is executed, the file handle f is
> there are nested do_file() calls, then the user will be limited by
> of open files the operating system provides. This doesn't seem to be
> case for the problem described above, but is a limit you may want to
> document as system dependent or remove by reading the whole file in
> string and closing the file prior to do_main().
I prefer closing the file prior to do_main(): when I'm editing a Lua
program, I can't save it if it is also running in Lua.