Skip to content

Commit 2d76b15

Browse files
authored
Merge pull request #52 from zhangjiequan/feat/extend_all_lua_types_for_pr
Replace hard-coded LUA_TTHREAD+1 with LUA_NUMTAGS macro to improve readability
2 parents 61d8cb5 + 93193a5 commit 2d76b15

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

emmy_debugger/include/emmy_debugger/api/lua_api_loader.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ typedef ptrdiff_t lua_KContext;
6262
#define LUA_TUSERDATA 7
6363
#define LUA_TTHREAD 8
6464

65+
#define LUA_NUMTAGS 9
66+
67+
6568
/*
6669
** Type for C functions registered with Lua
6770
*/

emmy_debugger/include/emmy_debugger/debugger/emmy_debugger.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,5 +143,5 @@ class Debugger: public std::enable_shared_from_this<Debugger>
143143

144144
Arena<Variable> *arenaRef;
145145

146-
std::bitset<LUA_TTHREAD+1> registeredTypes;
146+
std::bitset<LUA_NUMTAGS> registeredTypes;
147147
};

0 commit comments

Comments
 (0)