summaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorruki <[email protected]>2021-09-21 23:09:33 +0800
committerruki <[email protected]>2021-09-21 23:09:33 +0800
commit041b40c1cdb33052b48bcec8050fa9bcdaaadce2 (patch)
tree8d521abbc8c005ea538c771c2b9bec1aae9a4591 /core/src
parentd25d5d11dc33e252809b61631203ce862e06b058 (diff)
fix compile errors
Diffstat (limited to 'core/src')
-rw-r--r--core/src/xmake/os/find.c4
-rw-r--r--core/src/xmake/winos/registry_keys.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/core/src/xmake/os/find.c b/core/src/xmake/os/find.c
index 9d6a17eff..28539a138 100644
--- a/core/src/xmake/os/find.c
+++ b/core/src/xmake/os/find.c
@@ -177,10 +177,10 @@ tb_int_t xm_os_find(lua_State* lua)
tb_check_return_val(pattern, 0);
// the recursion level
- tb_long_t recursion = lua_tointeger(lua, 3);
+ tb_long_t recursion = (tb_long_t)lua_tointeger(lua, 3);
// the match mode
- tb_long_t mode = lua_tointeger(lua, 4);
+ tb_long_t mode = (tb_long_t)lua_tointeger(lua, 4);
// init table
lua_newtable(lua);
diff --git a/core/src/xmake/winos/registry_keys.c b/core/src/xmake/winos/registry_keys.c
index 234cdf035..9c3467210 100644
--- a/core/src/xmake/winos/registry_keys.c
+++ b/core/src/xmake/winos/registry_keys.c
@@ -172,7 +172,7 @@ tb_int_t xm_winos_registry_keys(lua_State* lua)
// get the arguments
tb_char_t const* rootkey = luaL_checkstring(lua, 1);
tb_char_t const* rootdir = luaL_checkstring(lua, 2);
- tb_long_t recursion = lua_tointeger(lua, 3);
+ tb_long_t recursion = (tb_long_t)lua_tointeger(lua, 3);
tb_bool_t is_function = lua_isfunction(lua, 4);
tb_check_return_val(rootkey && rootdir && is_function, 0);