[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua Debugger extension for SciTE
- From: Mike Pall <mikelu-0711@...>
- Date: Mon, 12 Nov 2007 17:28:24 +0100
Roberto Ierusalimschy wrote:
> > Note: there's nothing wrong with the Lua source code and there's
> > no other way to fix it other than fixing linkage.
>
> Maybe we could move that structure (and luaO_nilobject_) into the global
> state?
Apart from (probably) slowing things down, you're just shadowing
a bug then! That's generally considered a regression. I'd rather
have an error thrown. Something like:
static int staticcheck;
LUA_API void lua_checkconsistency(lua_State *L, int vernum)
{
if (vernum != LUA_VERSION_NUM || G(L)->staticcheck != &staticcheck)
luaG_runerror("...");
}
This should be called from strategic places, e.g. luaL_openlibs(),
luaL_register() and maybe some more.
--Mike