aboutsummaryrefslogtreecommitdiff
path: root/lapi.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-07-18 09:17:54 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-07-18 09:17:54 -0300
commit56137d58ff7abe8cb22ee3469366e08888c84f28 (patch)
tree6769e3c2403a69cf3f0d6dbf6fb4acb7442367e0 /lapi.c
parent9aec500a2691d2b13c307d143868c8a4fab33220 (diff)
downloadlua-56137d58ff7abe8cb22ee3469366e08888c84f28.tar.gz
lua-56137d58ff7abe8cb22ee3469366e08888c84f28.tar.bz2
lua-56137d58ff7abe8cb22ee3469366e08888c84f28.zip
added check for conversion 'obj2gco' (and corrections for small
problems detected by this check)
Diffstat (limited to 'lapi.c')
-rw-r--r--lapi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lapi.c b/lapi.c
index be6955a1..63e0e750 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lapi.c,v 2.225 2014/07/15 21:26:50 roberto Exp roberto $ 2** $Id: lapi.c,v 2.226 2014/07/17 13:53:37 roberto Exp roberto $
3** Lua API 3** Lua API
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -820,7 +820,7 @@ LUA_API int lua_setmetatable (lua_State *L, int objindex) {
820 case LUA_TUSERDATA: { 820 case LUA_TUSERDATA: {
821 uvalue(obj)->metatable = mt; 821 uvalue(obj)->metatable = mt;
822 if (mt) { 822 if (mt) {
823 luaC_objbarrier(L, rawuvalue(obj), mt); 823 luaC_objbarrier(L, uvalue(obj), mt);
824 luaC_checkfinalizer(L, gcvalue(obj), mt); 824 luaC_checkfinalizer(L, gcvalue(obj), mt);
825 } 825 }
826 break; 826 break;
@@ -958,7 +958,7 @@ LUA_API int lua_load (lua_State *L, lua_Reader reader, void *data,
958 const TValue *gt = luaH_getint(reg, LUA_RIDX_GLOBALS); 958 const TValue *gt = luaH_getint(reg, LUA_RIDX_GLOBALS);
959 /* set global table as 1st upvalue of 'f' (may be LUA_ENV) */ 959 /* set global table as 1st upvalue of 'f' (may be LUA_ENV) */
960 setobj(L, f->upvals[0]->v, gt); 960 setobj(L, f->upvals[0]->v, gt);
961 luaC_barrier(L, f->upvals[0], gt); 961 luaC_upvalbarrier(L, f->upvals[0]);
962 } 962 }
963 } 963 }
964 lua_unlock(L); 964 lua_unlock(L);