From 35e2e015c00ac10fca0c5648b63139ab475d9b2f Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Tue, 18 May 2021 17:47:36 +0800 Subject: [PATCH] fix compile error on windows --- cmake/define.inc | 1 + deps/lua/src/lobject.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmake/define.inc b/cmake/define.inc index add67fec57..ca169f2e0c 100755 --- a/cmake/define.inc +++ b/cmake/define.inc @@ -168,6 +168,7 @@ IF (TD_WINDOWS) INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/deps/regex) INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/deps/wepoll/inc) INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/deps/MsvcLibX/include) + INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/deps/lua/src) ENDIF () IF (TD_WINDOWS_64) diff --git a/deps/lua/src/lobject.h b/deps/lua/src/lobject.h index 8ce4405b6a..5a4506e580 100644 --- a/deps/lua/src/lobject.h +++ b/deps/lua/src/lobject.h @@ -10,7 +10,7 @@ #include - +#include #include "llimits.h" #include "lua.h" @@ -357,7 +357,7 @@ typedef struct Table { #define twoto(x) (1<<(x)) -#define sizenode(t) (twoto((t)->lsizenode)) +#define sizenode(t) (twoto((int64_t)((t)->lsizenode))) #define luaO_nilobject (&luaO_nilobject_) -- GitLab