New type 'TStatus' for thread status/error codes
This commit is contained in:
8
lstate.h
8
lstate.h
@@ -339,8 +339,8 @@ typedef struct global_State {
|
||||
*/
|
||||
struct lua_State {
|
||||
CommonHeader;
|
||||
lu_byte status;
|
||||
lu_byte allowhook;
|
||||
TStatus status;
|
||||
unsigned short nci; /* number of items in 'ci' list */
|
||||
StkIdRel top; /* first free slot in the stack */
|
||||
global_State *l_G;
|
||||
@@ -352,10 +352,10 @@ struct lua_State {
|
||||
GCObject *gclist;
|
||||
struct lua_State *twups; /* list of threads with open upvalues */
|
||||
struct lua_longjmp *errorJmp; /* current error recover point */
|
||||
CallInfo base_ci; /* CallInfo for first level (C calling Lua) */
|
||||
CallInfo base_ci; /* CallInfo for first level (C host) */
|
||||
volatile lua_Hook hook;
|
||||
ptrdiff_t errfunc; /* current error handling function (stack index) */
|
||||
l_uint32 nCcalls; /* number of nested (non-yieldable | C) calls */
|
||||
l_uint32 nCcalls; /* number of nested non-yieldable or C calls */
|
||||
int oldpc; /* last pc traced */
|
||||
int basehookcount;
|
||||
int hookcount;
|
||||
@@ -438,7 +438,7 @@ LUAI_FUNC void luaE_checkcstack (lua_State *L);
|
||||
LUAI_FUNC void luaE_incCstack (lua_State *L);
|
||||
LUAI_FUNC void luaE_warning (lua_State *L, const char *msg, int tocont);
|
||||
LUAI_FUNC void luaE_warnerror (lua_State *L, const char *where);
|
||||
LUAI_FUNC int luaE_resetthread (lua_State *L, int status);
|
||||
LUAI_FUNC TStatus luaE_resetthread (lua_State *L, TStatus status);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user