aboutsummaryrefslogtreecommitdiff
path: root/lfunc.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-12-13 13:07:53 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-12-13 13:07:53 -0200
commitfdc25a1ebfe9968dcec390dd556375105aa0be40 (patch)
tree43759131636a501ec92475d453fd1a1c73bc8090 /lfunc.h
parent3b06f983ae0e57b90cdeb500c84bb524e5c3635b (diff)
downloadlua-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.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/lfunc.h b/lfunc.h
index c9fe1314..0ed79c48 100644
--- a/lfunc.h
+++ b/lfunc.h
@@ -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
45LUAI_FUNC Proto *luaF_newproto (lua_State *L); 56LUAI_FUNC Proto *luaF_newproto (lua_State *L);
46LUAI_FUNC CClosure *luaF_newCclosure (lua_State *L, int nelems); 57LUAI_FUNC CClosure *luaF_newCclosure (lua_State *L, int nelems);
47LUAI_FUNC LClosure *luaF_newLclosure (lua_State *L, int nelems); 58LUAI_FUNC LClosure *luaF_newLclosure (lua_State *L, int nelems);