[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Hooks for I/O, memory, etc?
- From: "Thatcher Ulrich" <tu@...>
- Date: Tue, 11 Jun 2002 12:44:06 -0400
On Jun 11, 2002 at 09:47 -0600, Joshua Jensen wrote:
> You store the default callback for a new lua_open() in a global/static
> variable. There is no reason why you wouldn't want to do this.
I think one important reason would be if you're linking together more
than one subsystem that uses Lua. As it is, if they use separate Lua
states, they can be completely independent but still share a
liblua.dll/.so. If there are static variables within the Lua library,
then the two subsystems can potentially fight over those, and you have
a big headache.
Also, for the record, I don't have a problem with varargs in
lua_open(). But I think it looks gross to most C++ programmers, which
might explain the negative reactions.