diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-08-06 12:32:22 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-08-06 12:32:22 -0300 |
commit | a2fa48a570b01b2a2cd37f01799f08f693fc5892 (patch) | |
tree | b41fc7e88f7f941ae1589921f8d7c0ff57146f4d /lstate.h | |
parent | 8b2b8790b5c419282f4fa0c7faa168379647b3b9 (diff) | |
download | lua-a2fa48a570b01b2a2cd37f01799f08f693fc5892.tar.gz lua-a2fa48a570b01b2a2cd37f01799f08f693fc5892.tar.bz2 lua-a2fa48a570b01b2a2cd37f01799f08f693fc5892.zip |
new (old?) error handling scheme
Diffstat (limited to 'lstate.h')
-rw-r--r-- | lstate.h | 15 |
1 files changed, 2 insertions, 13 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstate.h,v 1.89 2002/07/16 14:26:56 roberto Exp roberto $ | 2 | ** $Id: lstate.h,v 1.90 2002/08/05 17:36:24 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 | */ |
@@ -101,15 +101,6 @@ typedef struct CallInfo { | |||
101 | } CallInfo; | 101 | } CallInfo; |
102 | 102 | ||
103 | 103 | ||
104 | /* | ||
105 | ** informations about a `protection' (error recovery points) | ||
106 | */ | ||
107 | typedef struct Protection { | ||
108 | ptrdiff_t ci; | ||
109 | ptrdiff_t top; | ||
110 | int allowhooks; | ||
111 | } Protection; | ||
112 | |||
113 | 104 | ||
114 | #define ci_func(ci) (clvalue((ci)->base - 1)) | 105 | #define ci_func(ci) (clvalue((ci)->base - 1)) |
115 | 106 | ||
@@ -154,9 +145,7 @@ struct lua_State { | |||
154 | lua_Hook hook; | 145 | lua_Hook hook; |
155 | UpVal *openupval; /* list of open upvalues in this stack */ | 146 | UpVal *openupval; /* list of open upvalues in this stack */ |
156 | struct lua_longjmp *errorJmp; /* current error recover point */ | 147 | struct lua_longjmp *errorJmp; /* current error recover point */ |
157 | Protection *toreset; /* array of pending pcall resets */ | 148 | ptrdiff_t errfunc; /* current error handling function (stack index) */ |
158 | int number_toreset; | ||
159 | int size_toreset; | ||
160 | lua_State *next; /* circular double linked list of states */ | 149 | lua_State *next; /* circular double linked list of states */ |
161 | lua_State *previous; | 150 | lua_State *previous; |
162 | TObject globs[NUMGLOBS]; /* registry, table of globals, etc. */ | 151 | TObject globs[NUMGLOBS]; /* registry, table of globals, etc. */ |