From 6aabf4b15e7637c2ab4133abf3df0a77f34b6005 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 14 Dec 2022 16:20:39 -0300 Subject: Details in some header files Identifier LUA_NUMTAGS was deprecated (changed to LUA_NUMTYPES) + better handling of some inclusion loops. --- lstate.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'lstate.h') diff --git a/lstate.h b/lstate.h index 2e907818..8bf6600e 100644 --- a/lstate.h +++ b/lstate.h @@ -9,6 +9,11 @@ #include "lua.h" + +/* Some header files included here need this definition */ +typedef struct CallInfo CallInfo; + + #include "lobject.h" #include "ltm.h" #include "lzio.h" @@ -169,7 +174,7 @@ typedef struct stringtable { ** - field 'transferinfo' is used only during call/returnhooks, ** before the function starts or after it ends. */ -typedef struct CallInfo { +struct CallInfo { StkIdRel func; /* function index in the stack */ StkIdRel top; /* top for this function */ struct CallInfo *previous, *next; /* dynamic call link */ @@ -196,7 +201,7 @@ typedef struct CallInfo { } u2; short nresults; /* expected number of results from this function */ unsigned short callstatus; -} CallInfo; +}; /* @@ -291,7 +296,7 @@ typedef struct global_State { struct lua_State *mainthread; TString *memerrmsg; /* message for memory-allocation errors */ TString *tmname[TM_N]; /* array with tag-method names */ - struct Table *mt[LUA_NUMTAGS]; /* metatables for basic types */ + struct Table *mt[LUA_NUMTYPES]; /* metatables for basic types */ TString *strcache[STRCACHE_N][STRCACHE_M]; /* cache for strings in API */ lua_WarnFunction warnf; /* warning function */ void *ud_warn; /* auxiliary data to 'warnf' */ -- cgit v1.2.3-55-g6feb