diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2022-12-14 16:20:39 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2022-12-14 16:20:39 -0300 |
commit | 6aabf4b15e7637c2ab4133abf3df0a77f34b6005 (patch) | |
tree | 16ca80a0820c3ebca4b64736fe6f5c9b9de2a19d /lstate.h | |
parent | fa2f294dd1269115bf9cf534dd38553e2f606801 (diff) | |
download | lua-6aabf4b15e7637c2ab4133abf3df0a77f34b6005.tar.gz lua-6aabf4b15e7637c2ab4133abf3df0a77f34b6005.tar.bz2 lua-6aabf4b15e7637c2ab4133abf3df0a77f34b6005.zip |
Details in some header files
Identifier LUA_NUMTAGS was deprecated (changed to LUA_NUMTYPES) +
better handling of some inclusion loops.
Diffstat (limited to 'lstate.h')
-rw-r--r-- | lstate.h | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -9,6 +9,11 @@ | |||
9 | 9 | ||
10 | #include "lua.h" | 10 | #include "lua.h" |
11 | 11 | ||
12 | |||
13 | /* Some header files included here need this definition */ | ||
14 | typedef struct CallInfo CallInfo; | ||
15 | |||
16 | |||
12 | #include "lobject.h" | 17 | #include "lobject.h" |
13 | #include "ltm.h" | 18 | #include "ltm.h" |
14 | #include "lzio.h" | 19 | #include "lzio.h" |
@@ -169,7 +174,7 @@ typedef struct stringtable { | |||
169 | ** - field 'transferinfo' is used only during call/returnhooks, | 174 | ** - field 'transferinfo' is used only during call/returnhooks, |
170 | ** before the function starts or after it ends. | 175 | ** before the function starts or after it ends. |
171 | */ | 176 | */ |
172 | typedef struct CallInfo { | 177 | struct CallInfo { |
173 | StkIdRel func; /* function index in the stack */ | 178 | StkIdRel func; /* function index in the stack */ |
174 | StkIdRel top; /* top for this function */ | 179 | StkIdRel top; /* top for this function */ |
175 | struct CallInfo *previous, *next; /* dynamic call link */ | 180 | struct CallInfo *previous, *next; /* dynamic call link */ |
@@ -196,7 +201,7 @@ typedef struct CallInfo { | |||
196 | } u2; | 201 | } u2; |
197 | short nresults; /* expected number of results from this function */ | 202 | short nresults; /* expected number of results from this function */ |
198 | unsigned short callstatus; | 203 | unsigned short callstatus; |
199 | } CallInfo; | 204 | }; |
200 | 205 | ||
201 | 206 | ||
202 | /* | 207 | /* |
@@ -291,7 +296,7 @@ typedef struct global_State { | |||
291 | struct lua_State *mainthread; | 296 | struct lua_State *mainthread; |
292 | TString *memerrmsg; /* message for memory-allocation errors */ | 297 | TString *memerrmsg; /* message for memory-allocation errors */ |
293 | TString *tmname[TM_N]; /* array with tag-method names */ | 298 | TString *tmname[TM_N]; /* array with tag-method names */ |
294 | struct Table *mt[LUA_NUMTAGS]; /* metatables for basic types */ | 299 | struct Table *mt[LUA_NUMTYPES]; /* metatables for basic types */ |
295 | TString *strcache[STRCACHE_N][STRCACHE_M]; /* cache for strings in API */ | 300 | TString *strcache[STRCACHE_N][STRCACHE_M]; /* cache for strings in API */ |
296 | lua_WarnFunction warnf; /* warning function */ | 301 | lua_WarnFunction warnf; /* warning function */ |
297 | void *ud_warn; /* auxiliary data to 'warnf' */ | 302 | void *ud_warn; /* auxiliary data to 'warnf' */ |