diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-10-06 17:44:22 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-10-06 17:44:22 -0300 |
| commit | 37b49aa4516934fcb23bbdb62a82ab1916275ac8 (patch) | |
| tree | f7eee56f986fe4bb5c2d75497f1209e72777162a | |
| parent | 0fa9b16148d5db21875d770299d8bd983063ac7a (diff) | |
| download | lua-37b49aa4516934fcb23bbdb62a82ab1916275ac8.tar.gz lua-37b49aa4516934fcb23bbdb62a82ab1916275ac8.tar.bz2 lua-37b49aa4516934fcb23bbdb62a82ab1916275ac8.zip | |
detail
| -rw-r--r-- | ldo.c | 10 |
1 files changed, 4 insertions, 6 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldo.c,v 2.32 2005/08/24 16:15:49 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 2.33 2005/09/09 18:16:28 roberto Exp roberto $ |
| 3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -316,14 +316,12 @@ int luaD_precall (lua_State *L, StkId func, int nresults) { | |||
| 316 | lua_unlock(L); | 316 | lua_unlock(L); |
| 317 | n = (*curr_func(L)->c.f)(L); /* do the actual call */ | 317 | n = (*curr_func(L)->c.f)(L); /* do the actual call */ |
| 318 | lua_lock(L); | 318 | lua_lock(L); |
| 319 | if (n >= 0) { /* no yielding? */ | 319 | if (n < 0) /* yielding? */ |
| 320 | return PCRYIELD; | ||
| 321 | else { | ||
| 320 | luaD_poscall(L, L->top - n); | 322 | luaD_poscall(L, L->top - n); |
| 321 | return PCRC; | 323 | return PCRC; |
| 322 | } | 324 | } |
| 323 | else { | ||
| 324 | ci->nresults = nresults; | ||
| 325 | return PCRYIELD; | ||
| 326 | } | ||
| 327 | } | 325 | } |
| 328 | } | 326 | } |
| 329 | 327 | ||
