From 892c891c66773919bcc435c8be0c914438bc8761 Mon Sep 17 00:00:00 2001 From: LoganDark Date: Mon, 8 Nov 2021 11:06:53 -0800 Subject: [PATCH] Use uint8_t for lua_Type and TValue.tt --- VM/include/lua.h | 2 +- VM/src/lobject.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VM/include/lua.h b/VM/include/lua.h index 8e7d6468..1631bfe1 100644 --- a/VM/include/lua.h +++ b/VM/include/lua.h @@ -58,7 +58,7 @@ typedef void* (*lua_Alloc)(lua_State* L, void* ud, void* ptr, size_t osize, size * grep "ORDER TYPE" */ // clang-format off -enum lua_Type +enum lua_Type: uint8_t { LUA_TNIL = 0, /* must be 0 due to lua_isnoneornil */ LUA_TBOOLEAN = 1, /* must be 1 due to l_isfalse */ diff --git a/VM/src/lobject.h b/VM/src/lobject.h index c5f2e2f4..aa2bba1d 100644 --- a/VM/src/lobject.h +++ b/VM/src/lobject.h @@ -48,7 +48,7 @@ typedef struct lua_TValue { Value value; int extra; - int tt; + uint8_t tt; } TValue; /* Macros to test type */