aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lmem.h5
-rw-r--r--lzio.h6
2 files changed, 6 insertions, 5 deletions
diff --git a/lmem.h b/lmem.h
index 9caf42fc..7af316f0 100644
--- a/lmem.h
+++ b/lmem.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lmem.h,v 1.41 2014/10/08 20:25:51 roberto Exp roberto $ 2** $Id: lmem.h,v 1.42 2014/12/19 13:45:40 roberto Exp roberto $
3** Interface to Memory Manager 3** Interface to Memory Manager
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -35,7 +35,8 @@
35/* 35/*
36** Arrays of chars do not need any test 36** Arrays of chars do not need any test
37*/ 37*/
38#define luaM_reallocvchar(L,b,on,n) luaM_realloc_(L, (b), (on), (n)) 38#define luaM_reallocvchar(L,b,on,n) \
39 cast(char *, luaM_realloc_(L, (b), (on)*sizeof(char), (n)*sizeof(char)))
39 40
40#define luaM_freemem(L, b, s) luaM_realloc_(L, (b), (s), 0) 41#define luaM_freemem(L, b, s) luaM_realloc_(L, (b), (s), 0)
41#define luaM_free(L, b) luaM_realloc_(L, (b), sizeof(*(b)), 0) 42#define luaM_free(L, b) luaM_realloc_(L, (b), sizeof(*(b)), 0)
diff --git a/lzio.h b/lzio.h
index 00778433..8a0c8171 100644
--- a/lzio.h
+++ b/lzio.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lzio.h,v 1.28 2014/01/31 15:14:22 roberto Exp roberto $ 2** $Id: lzio.h,v 1.29 2014/12/19 13:45:40 roberto Exp roberto $
3** Buffered streams 3** Buffered streams
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -37,8 +37,8 @@ typedef struct Mbuffer {
37 37
38 38
39#define luaZ_resizebuffer(L, buff, size) \ 39#define luaZ_resizebuffer(L, buff, size) \
40 ((buff)->buffer = cast(char *, luaM_reallocvchar(L, (buff)->buffer, \ 40 ((buff)->buffer = luaM_reallocvchar(L, (buff)->buffer, \
41 (buff)->buffsize, size)), \ 41 (buff)->buffsize, size), \
42 (buff)->buffsize = size) 42 (buff)->buffsize = size)
43 43
44#define luaZ_freebuffer(L, buff) luaZ_resizebuffer(L, buff, 0) 44#define luaZ_freebuffer(L, buff) luaZ_resizebuffer(L, buff, 0)