[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: GSL Shell software announcement
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Sat, 3 Oct 2009 18:38:44 -0300
> Basically, you may do
>
> for k,v in pairs(math) do _G[k] = v end
In C that could be simpler:
lua_pushvalue(L,LUA_GLOBALSINDEX); /* open math in global scope */
lua_setglobal(L,LUA_MATHLIBNAME);
luaopen_math(L);
lua_pushnil(L); /* remove math */
lua_setglobal(L,LUA_MATHLIBNAME);
This is what my ae does:
http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/#ae