diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-10-07 17:45:19 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-10-07 17:45:19 -0300 |
commit | 217e67cb224cbb9bd68a1bce7454b60d50894f79 (patch) | |
tree | dfe4ec94dbbc36707699f6e01cbeff62d8871041 /ldo.c | |
parent | 9bbfe9f3fde5225bfa441f9d26b84544cc6c9b6d (diff) | |
download | lua-217e67cb224cbb9bd68a1bce7454b60d50894f79.tar.gz lua-217e67cb224cbb9bd68a1bce7454b60d50894f79.tar.bz2 lua-217e67cb224cbb9bd68a1bce7454b60d50894f79.zip |
new type 'l_noret' for function that do not return
Diffstat (limited to 'ldo.c')
-rw-r--r-- | ldo.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.c,v 2.99 2011/08/23 17:24:34 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 2.100 2011/09/12 20:33:03 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 | */ |
@@ -100,7 +100,7 @@ static void seterrorobj (lua_State *L, int errcode, StkId oldtop) { | |||
100 | } | 100 | } |
101 | 101 | ||
102 | 102 | ||
103 | void luaD_throw (lua_State *L, int errcode) { | 103 | l_noret luaD_throw (lua_State *L, int errcode) { |
104 | if (L->errorJmp) { /* thread has an error handler? */ | 104 | if (L->errorJmp) { /* thread has an error handler? */ |
105 | L->errorJmp->status = errcode; /* set status */ | 105 | L->errorJmp->status = errcode; /* set status */ |
106 | LUAI_THROW(L, L->errorJmp); /* jump to it */ | 106 | LUAI_THROW(L, L->errorJmp); /* jump to it */ |
@@ -472,7 +472,7 @@ static int recover (lua_State *L, int status) { | |||
472 | ** coroutine itself. (Such errors should not be handled by any coroutine | 472 | ** coroutine itself. (Such errors should not be handled by any coroutine |
473 | ** error handler and should not kill the coroutine.) | 473 | ** error handler and should not kill the coroutine.) |
474 | */ | 474 | */ |
475 | static void resume_error (lua_State *L, const char *msg, StkId firstArg) { | 475 | static l_noret resume_error (lua_State *L, const char *msg, StkId firstArg) { |
476 | L->top = firstArg; /* remove args from the stack */ | 476 | L->top = firstArg; /* remove args from the stack */ |
477 | setsvalue2s(L, L->top, luaS_new(L, msg)); /* push error message */ | 477 | setsvalue2s(L, L->top, luaS_new(L, msg)); /* push error message */ |
478 | incr_top(L); | 478 | incr_top(L); |