lua-users home
lua-l archive

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

> 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?


-- Roberto