diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-12-13 13:07:53 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-12-13 13:07:53 -0200 |
commit | fdc25a1ebfe9968dcec390dd556375105aa0be40 (patch) | |
tree | 43759131636a501ec92475d453fd1a1c73bc8090 /ldo.c | |
parent | 3b06f983ae0e57b90cdeb500c84bb524e5c3635b (diff) | |
download | lua-fdc25a1ebfe9968dcec390dd556375105aa0be40.tar.gz lua-fdc25a1ebfe9968dcec390dd556375105aa0be40.tar.bz2 lua-fdc25a1ebfe9968dcec390dd556375105aa0be40.zip |
New functions 'lua_resetthread' and 'coroutine.kill'
New functions to reset/kill a thread/coroutine, mainly (only?) to
close any pending to-be-closed variable. ('lua_resetthread' also
allows a thread to be reused...)
Diffstat (limited to 'ldo.c')
-rw-r--r-- | ldo.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -98,6 +98,10 @@ void luaD_seterrorobj (lua_State *L, int errcode, StkId oldtop) { | |||
98 | setsvalue2s(L, oldtop, luaS_newliteral(L, "error in error handling")); | 98 | setsvalue2s(L, oldtop, luaS_newliteral(L, "error in error handling")); |
99 | break; | 99 | break; |
100 | } | 100 | } |
101 | case CLOSEPROTECT: { | ||
102 | setnilvalue(s2v(oldtop)); /* no error message */ | ||
103 | break; | ||
104 | } | ||
101 | default: { | 105 | default: { |
102 | setobjs2s(L, oldtop, L->top - 1); /* error message on current top */ | 106 | setobjs2s(L, oldtop, L->top - 1); /* error message on current top */ |
103 | break; | 107 | break; |