diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-03-10 14:14:37 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-03-10 14:14:37 -0300 |
commit | ba484b9eb16dd62a7c3a5400a66eb952b654d3f0 (patch) | |
tree | 31692ddf85265e5a46eab0cd55a0b0757a225e68 /lstate.h | |
parent | f9d015523ef48266cea37e13717c223c16941b23 (diff) | |
download | lua-ba484b9eb16dd62a7c3a5400a66eb952b654d3f0.tar.gz lua-ba484b9eb16dd62a7c3a5400a66eb952b654d3f0.tar.bz2 lua-ba484b9eb16dd62a7c3a5400a66eb952b654d3f0.zip |
yielding across lua_call (first version)
Diffstat (limited to 'lstate.h')
-rw-r--r-- | lstate.h | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstate.h,v 2.37 2009/02/18 17:20:56 roberto Exp roberto $ | 2 | ** $Id: lstate.h,v 2.38 2009/03/04 13:32:29 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 | */ |
@@ -87,6 +87,9 @@ typedef struct CallInfo { | |||
87 | struct { /* only for Lua functions */ | 87 | struct { /* only for Lua functions */ |
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 */ | ||
91 | lua_CFunction cont; /* continuation in case of yields */ | ||
92 | } c; | ||
90 | } u; | 93 | } u; |
91 | } CallInfo; | 94 | } CallInfo; |
92 | 95 | ||
@@ -160,7 +163,7 @@ struct lua_State { | |||
160 | CallInfo *base_ci; /* array of CallInfo's */ | 163 | CallInfo *base_ci; /* array of CallInfo's */ |
161 | int stacksize; | 164 | int stacksize; |
162 | int size_ci; /* size of array `base_ci' */ | 165 | int size_ci; /* size of array `base_ci' */ |
163 | unsigned short baseCcalls; /* number of nested C calls when resuming */ | 166 | unsigned short nny; /* number of non-yieldable calls in stack */ |
164 | lu_byte hookmask; | 167 | lu_byte hookmask; |
165 | lu_byte allowhook; | 168 | lu_byte allowhook; |
166 | int basehookcount; | 169 | int basehookcount; |