lua-users home
lua-l archive

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


>int const_tag = lua_newtag(L);
>lua_pushcfunction(L, MyFunc);
>lua_settagmethod(L, const_tag, "setglobal");
>
>This way I should be able to use my function to check the name of the
>function and not allow it to be written to, but again my function is never
>called.

Your function will only be called for globals whose values have tag const_tag.
So, you must explicitly set this tag for the globals you want to protect.
--lhf