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 /lfunc.h | |
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 'lfunc.h')
-rw-r--r-- | lfunc.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -42,6 +42,17 @@ | |||
42 | #define MAXMISS 10 | 42 | #define MAXMISS 10 |
43 | 43 | ||
44 | 44 | ||
45 | /* | ||
46 | ** Special "status" for 'luaF_close' | ||
47 | */ | ||
48 | |||
49 | /* close upvalues without running their closing methods */ | ||
50 | #define NOCLOSINGMETH (-1) | ||
51 | |||
52 | /* close upvalues running all closing methods in protected mode */ | ||
53 | #define CLOSEPROTECT (-2) | ||
54 | |||
55 | |||
45 | LUAI_FUNC Proto *luaF_newproto (lua_State *L); | 56 | LUAI_FUNC Proto *luaF_newproto (lua_State *L); |
46 | LUAI_FUNC CClosure *luaF_newCclosure (lua_State *L, int nelems); | 57 | LUAI_FUNC CClosure *luaF_newCclosure (lua_State *L, int nelems); |
47 | LUAI_FUNC LClosure *luaF_newLclosure (lua_State *L, int nelems); | 58 | LUAI_FUNC LClosure *luaF_newLclosure (lua_State *L, int nelems); |