lua-users home
lua-l archive

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


It was thus said that the Great Roberto Ierusalimschy once stated:
> > 	void signal_handler(int sig)
> > 	{
> > 	  if (!gsig)
> > 	  {
> > 	    gsig       = sig;
> > 	    ghookcount = lua_gethookcount(gL);
> > 	    ghookmask  = lua_gethookmask(gL);
> > 	    ghook      = lua_gethook(gL);
> > 	    lua_sethook(gL,luasigbackend,LUA_MASKCALL | LUA_MASKRET | LUA_MASKCOUNT,1);
> > 	  }
> > 	}
> 
> What is "gL" here?

  lua_State *gL;

  It's a C variable that is either global, or static to the file the
routines are defined in.

  -spc