diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-08-09 17:58:29 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-08-09 17:58:29 -0300 |
commit | 92afcf2823e5dfbe9bb10b0ed62306b6015fcfb8 (patch) | |
tree | 8e360f9491a5d547a8be1aaddce780adb9fcea6b /lstate.c | |
parent | b5bf7d9ef414ce05da8523b966d94252c32a4010 (diff) | |
download | lua-92afcf2823e5dfbe9bb10b0ed62306b6015fcfb8.tar.gz lua-92afcf2823e5dfbe9bb10b0ed62306b6015fcfb8.tar.bz2 lua-92afcf2823e5dfbe9bb10b0ed62306b6015fcfb8.zip |
no more 'luaH_setstr (used only once) + 'luaH_setint' receives value
to be set.
Diffstat (limited to 'lstate.c')
-rw-r--r-- | lstate.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstate.c,v 2.88 2010/12/20 18:17:46 roberto Exp roberto $ | 2 | ** $Id: lstate.c,v 2.89 2010/12/20 19:40:07 roberto Exp roberto $ |
3 | ** Global State | 3 | ** Global State |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -136,10 +136,10 @@ static void init_registry (lua_State *L, global_State *g) { | |||
136 | luaH_resize(L, registry, LUA_RIDX_LAST, 0); | 136 | luaH_resize(L, registry, LUA_RIDX_LAST, 0); |
137 | /* registry[LUA_RIDX_MAINTHREAD] = L */ | 137 | /* registry[LUA_RIDX_MAINTHREAD] = L */ |
138 | setthvalue(L, &mt, L); | 138 | setthvalue(L, &mt, L); |
139 | setobj2t(L, luaH_setint(L, registry, LUA_RIDX_MAINTHREAD), &mt); | 139 | luaH_setint(L, registry, LUA_RIDX_MAINTHREAD, &mt); |
140 | /* registry[LUA_RIDX_GLOBALS] = table of globals */ | 140 | /* registry[LUA_RIDX_GLOBALS] = table of globals */ |
141 | sethvalue(L, &mt, luaH_new(L)); | 141 | sethvalue(L, &mt, luaH_new(L)); |
142 | setobj2t(L, luaH_setint(L, registry, LUA_RIDX_GLOBALS), &mt); | 142 | luaH_setint(L, registry, LUA_RIDX_GLOBALS, &mt); |
143 | } | 143 | } |
144 | 144 | ||
145 | 145 | ||