diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2012-08-16 14:34:28 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2012-08-16 14:34:28 -0300 |
commit | a3e1c40d6d6fb81db9d8b58aee69466f715aab5c (patch) | |
tree | ea11a028d8d92772ad97879c7bc5bbe50318bbea /lvm.c | |
parent | c1a2a646c81000b03a243cbdeba9c4bd6dd7b474 (diff) | |
download | lua-a3e1c40d6d6fb81db9d8b58aee69466f715aab5c.tar.gz lua-a3e1c40d6d6fb81db9d8b58aee69466f715aab5c.tar.bz2 lua-a3e1c40d6d6fb81db9d8b58aee69466f715aab5c.zip |
remove of unecessary luaD_checkstack. (In some cases, C should
ensure stack space; in others, Lua can use the extra slots for
temporary values.)
Diffstat (limited to 'lvm.c')
-rw-r--r-- | lvm.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lvm.c,v 2.152 2012/06/08 15:14:04 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 2.153 2012/08/14 18:12:34 roberto Exp roberto $ |
3 | ** Lua virtual machine | 3 | ** Lua virtual machine |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -98,7 +98,6 @@ static void callTM (lua_State *L, const TValue *f, const TValue *p1, | |||
98 | setobj2s(L, L->top++, p2); /* 2nd argument */ | 98 | setobj2s(L, L->top++, p2); /* 2nd argument */ |
99 | if (!hasres) /* no result? 'p3' is third argument */ | 99 | if (!hasres) /* no result? 'p3' is third argument */ |
100 | setobj2s(L, L->top++, p3); /* 3rd argument */ | 100 | setobj2s(L, L->top++, p3); /* 3rd argument */ |
101 | luaD_checkstack(L, 0); | ||
102 | /* metamethod may yield only when called from Lua code */ | 101 | /* metamethod may yield only when called from Lua code */ |
103 | luaD_call(L, L->top - (4 - hasres), hasres, isLua(L->ci)); | 102 | luaD_call(L, L->top - (4 - hasres), hasres, isLua(L->ci)); |
104 | if (hasres) { /* if has result, move it to its place */ | 103 | if (hasres) { /* if has result, move it to its place */ |