* 'a' is a 'field' in a table (if its a global variable, it resides in _G - and thus you want to attach a metatable to _G - global enviroment)
http://pgl.yoyo.org/luai/i/lua_settable This one does.
2011/4/20 Marc Balmer
<marc@msys.ch>
Does the Lua C part call a metatable method when it produces a value of
a variable?
i.e, if I have a userdata value 'n', can I intercept somehow the operation
a = n
? At the moment, this assigns the string 'n' to a.
--
Łukasz Gruner