[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Read only variables
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 31 Jan 2002 11:50:37 -0200
>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