summaryrefslogtreecommitdiff
path: root/lcode.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-01-09 20:02:47 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-01-09 20:02:47 -0200
commitf083812c020186d0d919833100c1a0b6eda8c2c0 (patch)
tree29c2e1d25f05af62277aab03e8e070aaa1a0d664 /lcode.c
parent3533382a1ed7ba21f0233057c886be2dd8a71d92 (diff)
downloadlua-f083812c020186d0d919833100c1a0b6eda8c2c0.tar.gz
lua-f083812c020186d0d919833100c1a0b6eda8c2c0.tar.bz2
lua-f083812c020186d0d919833100c1a0b6eda8c2c0.zip
first implementation of coroutines
Diffstat (limited to 'lcode.c')
-rw-r--r--lcode.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lcode.c b/lcode.c
index 4e8d23c1..a93b52b9 100644
--- a/lcode.c
+++ b/lcode.c
@@ -264,8 +264,7 @@ static int nil_constant (FuncState *fs) {
264 264
265void luaK_setcallreturns (FuncState *fs, expdesc *e, int nresults) { 265void luaK_setcallreturns (FuncState *fs, expdesc *e, int nresults) {
266 if (e->k == VCALL) { /* expression is an open function call? */ 266 if (e->k == VCALL) { /* expression is an open function call? */
267 if (nresults == LUA_MULTRET) nresults = NO_REG; 267 SETARG_C(getcode(fs, e), nresults+1);
268 SETARG_C(getcode(fs, e), nresults);
269 if (nresults == 1) { /* `regular' expression? */ 268 if (nresults == 1) { /* `regular' expression? */
270 e->k = VNONRELOC; 269 e->k = VNONRELOC;
271 e->u.i.info = GETARG_A(getcode(fs, e)); 270 e->u.i.info = GETARG_A(getcode(fs, e));