[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lua_settagmethod
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 18 Jan 2000 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