lua-users home
lua-l archive

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


> Shouldn't there be a luai_apicheck(L, ref != 0) at the beginning of
> luaL_unref ?

'luai_apicheck' is defined only inside the Lua kernel; it cannot be
used in the auxlib. There could be something similar, but it does not
sound very useful to me. Most other functions in the auxlib also do
not check their parameters, and even the kernel API does not check
for more obvious errors, such as L==NULL. (Many API errors in C are
uncheckable, for instance checking whether the state L being passed to
an API function was closed.)

-- Roberto