mirror of
https://github.com/lua/lua
synced 2026-09-26 16:17:11 +03:00
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:
parent
cd38fe8cf3
commit
e5f4927a0b
2 changed files with 27 additions and 33 deletions
3
lmem.h
3
lmem.h
|
|
@ -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))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue