mirror of
https://github.com/lua/lua
synced 2025-02-12 03:04:03 +03:00
better names for barrier macros
This commit is contained in:
parent
e94fac8956
commit
3819c30e55
8
lapi.c
8
lapi.c
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lapi.c,v 2.129 2010/05/14 13:15:26 roberto Exp roberto $
|
** $Id: lapi.c,v 2.130 2010/05/31 16:08:55 roberto Exp roberto $
|
||||||
** Lua API
|
** Lua API
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -689,7 +689,7 @@ LUA_API void lua_rawset (lua_State *L, int idx) {
|
|||||||
t = index2addr(L, idx);
|
t = index2addr(L, idx);
|
||||||
api_check(L, ttistable(t), "table expected");
|
api_check(L, ttistable(t), "table expected");
|
||||||
setobj2t(L, luaH_set(L, hvalue(t), L->top-2), L->top-1);
|
setobj2t(L, luaH_set(L, hvalue(t), L->top-2), L->top-1);
|
||||||
luaC_barriert(L, hvalue(t), L->top-1);
|
luaC_barrierback(L, gcvalue(t), L->top-1);
|
||||||
L->top -= 2;
|
L->top -= 2;
|
||||||
lua_unlock(L);
|
lua_unlock(L);
|
||||||
}
|
}
|
||||||
@ -702,7 +702,7 @@ LUA_API void lua_rawseti (lua_State *L, int idx, int n) {
|
|||||||
o = index2addr(L, idx);
|
o = index2addr(L, idx);
|
||||||
api_check(L, ttistable(o), "table expected");
|
api_check(L, ttistable(o), "table expected");
|
||||||
setobj2t(L, luaH_setint(L, hvalue(o), n), L->top-1);
|
setobj2t(L, luaH_setint(L, hvalue(o), n), L->top-1);
|
||||||
luaC_barriert(L, hvalue(o), L->top-1);
|
luaC_barrierback(L, gcvalue(o), L->top-1);
|
||||||
L->top--;
|
L->top--;
|
||||||
lua_unlock(L);
|
lua_unlock(L);
|
||||||
}
|
}
|
||||||
@ -725,7 +725,7 @@ LUA_API int lua_setmetatable (lua_State *L, int objindex) {
|
|||||||
case LUA_TTABLE: {
|
case LUA_TTABLE: {
|
||||||
hvalue(obj)->metatable = mt;
|
hvalue(obj)->metatable = mt;
|
||||||
if (mt)
|
if (mt)
|
||||||
luaC_objbarriert(L, hvalue(obj), mt);
|
luaC_objbarrierback(L, gcvalue(obj), mt);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case LUA_TUSERDATA: {
|
case LUA_TUSERDATA: {
|
||||||
|
4
ltable.c
4
ltable.c
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: ltable.c,v 2.49 2010/04/13 20:48:12 roberto Exp roberto $
|
** $Id: ltable.c,v 2.50 2010/04/18 13:22:48 roberto Exp roberto $
|
||||||
** Lua tables (hash)
|
** Lua tables (hash)
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -423,7 +423,7 @@ static TValue *newkey (lua_State *L, Table *t, const TValue *key) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
setobj2t(L, gkey(mp), key);
|
setobj2t(L, gkey(mp), key);
|
||||||
luaC_barriert(L, t, key);
|
luaC_barrierback(L, obj2gco(t), key);
|
||||||
lua_assert(ttisnil(gval(mp)));
|
lua_assert(ttisnil(gval(mp)));
|
||||||
return gval(mp);
|
return gval(mp);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user