aboutsummaryrefslogtreecommitdiff
path: root/lstate.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2009-03-23 11:26:12 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2009-03-23 11:26:12 -0300
commit6d0ae11c576106b490a53215c3f227b65ace2776 (patch)
treefcb09763cf7f81036ed277e65dc5c967d77deef4 /lstate.h
parent3ca739b418243544ecc1098e34c71f2378bad915 (diff)
downloadlua-6d0ae11c576106b490a53215c3f227b65ace2776.tar.gz
lua-6d0ae11c576106b490a53215c3f227b65ace2776.tar.bz2
lua-6d0ae11c576106b490a53215c3f227b65ace2776.zip
'context' added to suspendable calls
Diffstat (limited to 'lstate.h')
-rw-r--r--lstate.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/lstate.h b/lstate.h
index f27631d0..2cbb95e5 100644
--- a/lstate.h
+++ b/lstate.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstate.h,v 2.38 2009/03/04 13:32:29 roberto Exp roberto $ 2** $Id: lstate.h,v 2.39 2009/03/10 17:14:37 roberto Exp roberto $
3** Global State 3** Global State
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -88,7 +88,8 @@ typedef struct CallInfo {
88 int tailcalls; /* number of tail calls lost under this entry */ 88 int tailcalls; /* number of tail calls lost under this entry */
89 } l; 89 } l;
90 struct { /* only for C functions */ 90 struct { /* only for C functions */
91 lua_CFunction cont; /* continuation in case of yields */ 91 int ctx; /* context info. in case of yields */
92 lua_CFunction k; /* continuation in case of yields */
92 } c; 93 } c;
93 } u; 94 } u;
94} CallInfo; 95} CallInfo;
@@ -101,6 +102,7 @@ typedef struct CallInfo {
101#define CIST_HOOKED 2 /* call is running a debug hook */ 102#define CIST_HOOKED 2 /* call is running a debug hook */
102#define CIST_REENTRY 4 /* call is running on same invocation of 103#define CIST_REENTRY 4 /* call is running on same invocation of
103 luaV_execute of previous call */ 104 luaV_execute of previous call */
105#define CIST_CTX 8 /* call has a ctx value */
104 106
105 107
106#define curr_func(L) (clvalue(L->ci->func)) 108#define curr_func(L) (clvalue(L->ci->func))