lua-users home
lua-l archive

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

On Tue, 2007-12-18 at 01:31 -0800, Tony Paloma wrote:

First up, instead of:

> lua_getglobal(GetLuaState(), "hook.Call");


lua_getglobal(GetLuaState(), "hook");
lua_pushliteral(GetLuaState(), "Call");
lua_gettable(GetLuaState(), -2);
lua_remove(GetLuaState(), -2);

Also, I'd be tempted to stuff a lua_State *L = GetLuaState() at the top,
unless GetLuaState is a correctly consted function such that the
compiler can optimise away calls to it.


Daniel Silverstone               
PGP mail accepted and encouraged.            Key Id: 2BC8 4016 2068 7895