summaryrefslogtreecommitdiff
path: root/lib/lua/src/lapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lua/src/lapi.c')
-rw-r--r--lib/lua/src/lapi.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/lua/src/lapi.c b/lib/lua/src/lapi.c
index e456c8f..849c724 100644
--- a/lib/lua/src/lapi.c
+++ b/lib/lua/src/lapi.c
@@ -1,5 +1,5 @@
/*
-** $Id: lapi.c,v 1.6 2007-07-27 10:05:53 pixel Exp $
+** $Id: lapi.c,v 1.7 2008-02-17 00:35:20 pixel Exp $
** Lua API
** See Copyright Notice in lua.h
*/
@@ -123,6 +123,11 @@ LUA_API void lua_xmove (lua_State *from, lua_State *to, int n) {
}
+LUA_API void lua_setlevel (lua_State *from, lua_State *to) {
+ to->nCcalls = from->nCcalls;
+}
+
+
LUA_API lua_CFunction lua_atpanic (lua_State *L, lua_CFunction panicf) {
lua_CFunction old;
lua_lock(L);
@@ -749,7 +754,7 @@ LUA_API int lua_setfenv (lua_State *L, int idx) {
res = 0;
break;
}
- luaC_objbarrier(L, gcvalue(o), hvalue(L->top - 1));
+ if (res) luaC_objbarrier(L, gcvalue(o), hvalue(L->top - 1));
L->top--;
lua_unlock(L);
return res;