lua-users home
lua-l archive

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


> In lobject.h, there is a comment that says "for internal debug only" which
> precedes the definition of checkconsistency. checkconsistency seems to be
> moderately widely used. What's the intention here?

To check consistency ;) The macro assures that a Lua value either is not
a collectable object (that is, it is a boolean, number, light userdata,
or nil) or that it points to an object of the correct type. In normal
compilation, lua_assert does nothing (see llimits.h), so this macro does
nothing, too.

-- Roberto