lua-users home
lua-l archive

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


>In my C code I used the following two calls to delete all globals inside  
>a Lua state:
>
>lua_newtable(L);
>lua_setglobals(L);
>
>How do I write this correctly for Lua 5?

lua_newtable(L);
lua_replace(L, LUA_GLOBALSINDEX);

--lhf