[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: is this a bug in lua core 5.0b ?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Fri, 31 Jan 2003 10:08:04 +0000
> The only example of use is in luser_tests.h, which, although being
> sufficient, is not used anywhere.
It is used in ltests.h itself:
> #define LUA_USERSTATE int *
> #define getlock(l) (*(cast(LUA_USERSTATE *, l) - 1))
The "getlock" macro shows how to access your data given lua_State *l.
(The macro itself is used in macros lua_lock/lua_unlock, which then
are used inside Lua. They test whether lua_lock/lua_unlock are
corrected paired in the code.)
> I have also noticed that there a thing called LUSER_ALLIGNMENT_T,
> already having void* in the union. Would this thing be safe to use?
Yes.
-- Roberto