lua-users home
lua-l archive

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


> Perhaps the limit LUA_MAXCSTACK should be an arbitrary number, but the
> other macros that are dependent on this value, such as
> LUA_REGISTRYINDEX et. al., should just subtract from this maximum
> stack value. e.g.
> 
> #define LUA_REGISTRYINDEX ((-LUA_MAXCSTACK) - 1)
> 
> Currently it's misleading that one could change LUA_MAXCSTACK without
> consequences when it must be less than the absolute value of these...
> values.

Even the patch includes a comment about this:

	 (must be smaller than -LUA_REGISTRYINDEX)

For the future (5.2) we will define LUA_REGISTRYINDEX
based on LUA_MAXCSTACK.  For 5.1,
http://lua-users.org/lists/lua-l/2008-02/msg00390.html explains why not.

-- Roberto