Array sizes in undump changed from unsigned to int

Array sizes are always int and are dumped as int, so there is no reason
to read them back as unsigned.
This commit is contained in:
Roberto Ierusalimschy
2025-02-20 10:09:04 -03:00
parent cd38fe8cf3
commit e5f4927a0b
2 changed files with 27 additions and 33 deletions

3
lmem.h
View File

@@ -57,7 +57,8 @@
#define luaM_freearray(L, b, n) luaM_free_(L, (b), (n)*sizeof(*(b)))
#define luaM_new(L,t) cast(t*, luaM_malloc_(L, sizeof(t), 0))
#define luaM_newvector(L,n,t) cast(t*, luaM_malloc_(L, (n)*sizeof(t), 0))
#define luaM_newvector(L,n,t) \
cast(t*, luaM_malloc_(L, cast_sizet(n)*sizeof(t), 0))
#define luaM_newvectorchecked(L,n,t) \
(luaM_checksize(L,n,sizeof(t)), luaM_newvector(L,n,t))