diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2012-06-08 12:14:04 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2012-06-08 12:14:04 -0300 |
| commit | cc2a60ecb7e4c57ed31e5c5c3f49d8dc7447acc5 (patch) | |
| tree | bd702ddf14ba4e1b57959bf978ec062f03ad861f /lstate.h | |
| parent | 43bfb60ac8add40a6099b933bc8454c11471c386 (diff) | |
| download | lua-cc2a60ecb7e4c57ed31e5c5c3f49d8dc7447acc5.tar.gz lua-cc2a60ecb7e4c57ed31e5c5c3f49d8dc7447acc5.tar.bz2 lua-cc2a60ecb7e4c57ed31e5c5c3f49d8dc7447acc5.zip | |
bugs in yields inside debug hooks
Diffstat (limited to 'lstate.h')
| -rw-r--r-- | lstate.h | 5 |
1 files changed, 3 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lstate.h,v 2.79 2012/05/22 17:32:25 roberto Exp roberto $ | 2 | ** $Id: lstate.h,v 2.80 2012/05/22 17:50:39 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 | */ |
| @@ -72,6 +72,7 @@ typedef struct CallInfo { | |||
| 72 | struct CallInfo *previous, *next; /* dynamic call link */ | 72 | struct CallInfo *previous, *next; /* dynamic call link */ |
| 73 | short nresults; /* expected number of results from this function */ | 73 | short nresults; /* expected number of results from this function */ |
| 74 | lu_byte callstatus; | 74 | lu_byte callstatus; |
| 75 | ptrdiff_t extra; | ||
| 75 | union { | 76 | union { |
| 76 | struct { /* only for Lua functions */ | 77 | struct { /* only for Lua functions */ |
| 77 | StkId base; /* base for this function */ | 78 | StkId base; /* base for this function */ |
| @@ -81,7 +82,6 @@ typedef struct CallInfo { | |||
| 81 | int ctx; /* context info. in case of yields */ | 82 | int ctx; /* context info. in case of yields */ |
| 82 | lua_CFunction k; /* continuation in case of yields */ | 83 | lua_CFunction k; /* continuation in case of yields */ |
| 83 | ptrdiff_t old_errfunc; | 84 | ptrdiff_t old_errfunc; |
| 84 | ptrdiff_t extra; | ||
| 85 | lu_byte old_allowhook; | 85 | lu_byte old_allowhook; |
| 86 | lu_byte status; | 86 | lu_byte status; |
| 87 | } c; | 87 | } c; |
| @@ -100,6 +100,7 @@ typedef struct CallInfo { | |||
| 100 | #define CIST_YPCALL (1<<4) /* call is a yieldable protected call */ | 100 | #define CIST_YPCALL (1<<4) /* call is a yieldable protected call */ |
| 101 | #define CIST_STAT (1<<5) /* call has an error status (pcall) */ | 101 | #define CIST_STAT (1<<5) /* call has an error status (pcall) */ |
| 102 | #define CIST_TAIL (1<<6) /* call was tail called */ | 102 | #define CIST_TAIL (1<<6) /* call was tail called */ |
| 103 | #define CIST_HOOKYIELD (1<<7) /* last hook called yielded */ | ||
| 103 | 104 | ||
| 104 | 105 | ||
| 105 | #define isLua(ci) ((ci)->callstatus & CIST_LUA) | 106 | #define isLua(ci) ((ci)->callstatus & CIST_LUA) |
