mirror of https://github.com/rusefi/lua.git
comment (LUA_GLOBALSINDEX does not need write barrier in lua_replace)
This commit is contained in:
parent
3a515df086
commit
dd3519ab89
3
lapi.c
3
lapi.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lapi.c,v 2.61 2007/08/07 16:53:40 roberto Exp roberto $
|
** $Id: lapi.c,v 2.62 2007/11/28 18:27:38 roberto Exp roberto $
|
||||||
** Lua API
|
** Lua API
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -193,6 +193,7 @@ LUA_API void lua_replace (lua_State *L, int idx) {
|
||||||
if (idx < LUA_GLOBALSINDEX) /* function upvalue? */
|
if (idx < LUA_GLOBALSINDEX) /* function upvalue? */
|
||||||
luaC_barrier(L, curr_func(L), L->top - 1);
|
luaC_barrier(L, curr_func(L), L->top - 1);
|
||||||
}
|
}
|
||||||
|
/* LUA_GLOBALSINDEX does not need gc barrier (threads are never black) */
|
||||||
L->top--;
|
L->top--;
|
||||||
lua_unlock(L);
|
lua_unlock(L);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue