aboutsummaryrefslogtreecommitdiff
path: root/lmem.c
diff options
context:
space:
mode:
Diffstat (limited to 'lmem.c')
-rw-r--r--lmem.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lmem.c b/lmem.c
index dfd8a49b..d02c9fdc 100644
--- a/lmem.c
+++ b/lmem.c
@@ -95,7 +95,7 @@ static void *firsttry (global_State *g, void *block, size_t os, size_t ns) {
95 95
96 96
97void *luaM_growaux_ (lua_State *L, void *block, int nelems, int *psize, 97void *luaM_growaux_ (lua_State *L, void *block, int nelems, int *psize,
98 int size_elems, int limit, const char *what) { 98 unsigned size_elems, int limit, const char *what) {
99 void *newblock; 99 void *newblock;
100 int size = *psize; 100 int size = *psize;
101 if (nelems + 1 <= size) /* does one extra element still fit? */ 101 if (nelems + 1 <= size) /* does one extra element still fit? */
@@ -203,9 +203,9 @@ void *luaM_malloc_ (lua_State *L, size_t size, int tag) {
203 return NULL; /* that's all */ 203 return NULL; /* that's all */
204 else { 204 else {
205 global_State *g = G(L); 205 global_State *g = G(L);
206 void *newblock = firsttry(g, NULL, tag, size); 206 void *newblock = firsttry(g, NULL, cast_sizet(tag), size);
207 if (l_unlikely(newblock == NULL)) { 207 if (l_unlikely(newblock == NULL)) {
208 newblock = tryagain(L, NULL, tag, size); 208 newblock = tryagain(L, NULL, cast_sizet(tag), size);
209 if (newblock == NULL) 209 if (newblock == NULL)
210 luaM_error(L); 210 luaM_error(L);
211 } 211 }