From 2ac0581fcaaf3a0ba10dd98a368546fbb05b9456 Mon Sep 17 00:00:00 2001 From: huangqinjin Date: Tue, 29 Oct 2024 12:43:30 +0800 Subject: [PATCH] odbc: Fix conversion warning --- src/ls_odbc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ls_odbc.c b/src/ls_odbc.c index 8e38d1a..8832aab 100644 --- a/src/ls_odbc.c +++ b/src/ls_odbc.c @@ -697,7 +697,11 @@ static int raw_execute(lua_State *L, int istmt) return fail(L, hSTMT, stmt->hstmt); } - lua_pushnumber(L, numrows); +#if LUA_VERSION_NUM >= 503 + lua_pushinteger(L, (lua_Integer)numrows); +#else + lua_pushnumber(L, (lua_Number)numrows); +#endif return 1; } }