Re: lua_settagmethod
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: lua_settagmethod
- From: Roberto Ierusalimschy <roberto@...>
- Date: 2000年1月18日 11:10:45 -0200
> Rather than changing the LUA code I'd like to change _ALERT to map to
> my function instead. [...]
That is exactly what you have to do. There are no tags involved; just change
the value of _ALERT to be your function:
lua_pushcfunction(myFunction);
lua_setglobal("_ALERT");
(Remember that all function names are in fact regular global variables that
happen to contain function values.)
-- Roberto