lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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.

-- 
Thatcher Ulrich
http://tulrich.com