From 7d7ae8781e64e2b3b212d5c7b7c1b98b694df5ef Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 21 Jan 2025 13:33:59 -0300 Subject: Parameters for 'lua_createtable' back to int Tables don't accept sizes larger than int. --- lapi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lapi.c') diff --git a/lapi.c b/lapi.c index cf73324b..47d328ca 100644 --- a/lapi.c +++ b/lapi.c @@ -782,14 +782,14 @@ LUA_API int lua_rawgetp (lua_State *L, int idx, const void *p) { } -LUA_API void lua_createtable (lua_State *L, unsigned narray, unsigned nrec) { +LUA_API void lua_createtable (lua_State *L, int narray, int nrec) { Table *t; lua_lock(L); t = luaH_new(L); sethvalue2s(L, L->top.p, t); api_incr_top(L); if (narray > 0 || nrec > 0) - luaH_resize(L, t, narray, nrec); + luaH_resize(L, t, cast_uint(narray), cast_uint(nrec)); luaC_checkGC(L); lua_unlock(L); } -- cgit v1.2.3-55-g6feb