diff options
Diffstat (limited to 'lmem.h')
-rw-r--r-- | lmem.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -57,7 +57,8 @@ | |||
57 | #define luaM_freearray(L, b, n) luaM_free_(L, (b), (n)*sizeof(*(b))) | 57 | #define luaM_freearray(L, b, n) luaM_free_(L, (b), (n)*sizeof(*(b))) |
58 | 58 | ||
59 | #define luaM_new(L,t) cast(t*, luaM_malloc_(L, sizeof(t), 0)) | 59 | #define luaM_new(L,t) cast(t*, luaM_malloc_(L, sizeof(t), 0)) |
60 | #define luaM_newvector(L,n,t) cast(t*, luaM_malloc_(L, (n)*sizeof(t), 0)) | 60 | #define luaM_newvector(L,n,t) \ |
61 | cast(t*, luaM_malloc_(L, cast_sizet(n)*sizeof(t), 0)) | ||
61 | #define luaM_newvectorchecked(L,n,t) \ | 62 | #define luaM_newvectorchecked(L,n,t) \ |
62 | (luaM_checksize(L,n,sizeof(t)), luaM_newvector(L,n,t)) | 63 | (luaM_checksize(L,n,sizeof(t)), luaM_newvector(L,n,t)) |
63 | 64 | ||