new API for coroutines

This commit is contained in:
Roberto Ierusalimschy
2002-11-06 17:08:00 -02:00
parent 6820da5096
commit 118347d8c3
6 changed files with 85 additions and 88 deletions

3
lvm.c
View File

@@ -1,5 +1,5 @@
/*
** $Id: lvm.c,v 1.257 2002/10/08 18:46:08 roberto Exp roberto $
** $Id: lvm.c,v 1.258 2002/10/25 20:05:28 roberto Exp roberto $
** Lua virtual machine
** See Copyright Notice in lua.h
*/
@@ -592,6 +592,7 @@ StkId luaV_execute (lua_State *L) {
if (firstResult > L->top) { /* yield? */
(L->ci - 1)->u.l.savedpc = pc;
(L->ci - 1)->state = CI_SAVEDPC;
L->ci->state |= CI_YIELD;
return NULL;
}
/* it was a C function (`precall' called it); adjust results */