diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-01-21 13:33:59 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-01-21 13:33:59 -0300 |
commit | 7d7ae8781e64e2b3b212d5c7b7c1b98b694df5ef (patch) | |
tree | a29433a8a29cd79ec3c8abc308c133e81d4259c6 /lapi.c | |
parent | 724012d3d07f43f03451bb05d2bd9f55dff1d116 (diff) | |
download | lua-7d7ae8781e64e2b3b212d5c7b7c1b98b694df5ef.tar.gz lua-7d7ae8781e64e2b3b212d5c7b7c1b98b694df5ef.tar.bz2 lua-7d7ae8781e64e2b3b212d5c7b7c1b98b694df5ef.zip |
Parameters for 'lua_createtable' back to int
Tables don't accept sizes larger than int.
Diffstat (limited to 'lapi.c')
-rw-r--r-- | lapi.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -782,14 +782,14 @@ LUA_API int lua_rawgetp (lua_State *L, int idx, const void *p) { | |||
782 | } | 782 | } |
783 | 783 | ||
784 | 784 | ||
785 | LUA_API void lua_createtable (lua_State *L, unsigned narray, unsigned nrec) { | 785 | LUA_API void lua_createtable (lua_State *L, int narray, int nrec) { |
786 | Table *t; | 786 | Table *t; |
787 | lua_lock(L); | 787 | lua_lock(L); |
788 | t = luaH_new(L); | 788 | t = luaH_new(L); |
789 | sethvalue2s(L, L->top.p, t); | 789 | sethvalue2s(L, L->top.p, t); |
790 | api_incr_top(L); | 790 | api_incr_top(L); |
791 | if (narray > 0 || nrec > 0) | 791 | if (narray > 0 || nrec > 0) |
792 | luaH_resize(L, t, narray, nrec); | 792 | luaH_resize(L, t, cast_uint(narray), cast_uint(nrec)); |
793 | luaC_checkGC(L); | 793 | luaC_checkGC(L); |
794 | lua_unlock(L); | 794 | lua_unlock(L); |
795 | } | 795 | } |