diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-03-23 11:26:12 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-03-23 11:26:12 -0300 |
commit | 6d0ae11c576106b490a53215c3f227b65ace2776 (patch) | |
tree | fcb09763cf7f81036ed277e65dc5c967d77deef4 /lstate.h | |
parent | 3ca739b418243544ecc1098e34c71f2378bad915 (diff) | |
download | lua-6d0ae11c576106b490a53215c3f227b65ace2776.tar.gz lua-6d0ae11c576106b490a53215c3f227b65ace2776.tar.bz2 lua-6d0ae11c576106b490a53215c3f227b65ace2776.zip |
'context' added to suspendable calls
Diffstat (limited to 'lstate.h')
-rw-r--r-- | lstate.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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)) |