lua-users home
lua-l archive

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




On 21 July 2011 08:06, Murray S. Kucherawy <msk@cloudmark.com> wrote:
use(m, y, n)

Can you please post the code for 'use' ie what happens before "ud = lua_touserdata(L, n);", specifically where does 'n' come from. What are m and n which are passed from Lua to 'use'?

off topic:
"“lookup” actually is a registered C function that does a hash table lookup.  On a miss, “x” is set to false and “y” to nil; on a hit, “x” is set to true and “y” is set to a new userdata with a metatable assigned to it using:"

Why do you use two values to represent the same thing. If y is valid then x is true and I would think 'x' is therefore redundant ?


Liam