   a question about  pseudo-index LUA_ENVIRONINDEX.
  i'm confused by the codes segement from gpg6 as followingvoid init (const char* tname, const char* bname, const luaL_reg *flist, int (*destroy) (lua_State*)) { lua_newtable(L); // create table for uniquenesslua_pushstring(L,"v");lua_setfield(L,-2,"__mode"); // set as weak-value tablelua_pushvalue(L,-1); // duplicate tablelua_setmetatable(L,-2); // set itself as metatablelua_replace(L,LUA_ENVIRONINDEX); // set table as env tableluaL_register(L,tname,flist); // create libtable}so,if i'm correct lua_replace(L,LUA_ENVIRONINDEX) set the table at top stack as env table ,when calling luaL_register(L,tname,flist),the functions in table tname use the special table as envoriment table.if i'm wrong,please correct me!   