History

Lua 5.1.3-rc1

Lua Team committed 18 years ago

Commit ea97e791 parent 4d388a360 files · +732 −439Browse files

Showing the changes to src/lapi.c (1 of 60 files). Show all

Unified · Split

src/lapi.c+7−2
@@ -1,5 +1,5 @@
11 /*
2−** $Id: lapi.c,v 2.55 2006/06/07 12:37:17 roberto Exp $
2+** $Id: lapi.c,v 2.55.1.3 2008/01/03 15:20:39 roberto Exp $
33 ** Lua API
44 ** See Copyright Notice in lua.h
55 */
@@ -123,6 +123,11 @@ LUA_API void lua_xmove (lua_State *from, lua_State *to, int n) { · 117 unmodified lines
123123 }
124124
125125
126+LUA_API void lua_setlevel (lua_State *from, lua_State *to) {
127+ to->nCcalls = from->nCcalls;
128+}
129+
130+
126131 LUA_API lua_CFunction lua_atpanic (lua_State *L, lua_CFunction panicf) {
127132 lua_CFunction old;
128133 lua_lock(L);
@@ -749,7 +754,7 @@ LUA_API int lua_setfenv (lua_State *L, int idx) { · 620 unmodified lines
749754 res = 0;
750755 break;
751756 }
752− luaC_objbarrier(L, gcvalue(o), hvalue(L->top - 1));
757+ if (res) luaC_objbarrier(L, gcvalue(o), hvalue(L->top - 1));
753758 L->top--;
754759 lua_unlock(L);
755760 return res;