diff options
-rw-r--r-- | lmem.h | 2 | ||||
-rw-r--r-- | ltable.c | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -19,7 +19,7 @@ void *luaM_growaux (lua_State *L, void *block, int *size, int size_elem, | |||
19 | int limit, const l_char *errormsg); | 19 | int limit, const l_char *errormsg); |
20 | 20 | ||
21 | #define luaM_free(L, b, s) luaM_realloc(L, (b), (s), 0) | 21 | #define luaM_free(L, b, s) luaM_realloc(L, (b), (s), 0) |
22 | #define luaM_freelem(L, b, t) luaM_realloc(L, (b), sizeof(t), 0) | 22 | #define luaM_freelem(L, b) luaM_realloc(L, (b), sizeof(*(b)), 0) |
23 | #define luaM_freearray(L, b, n, t) luaM_realloc(L, (b), \ | 23 | #define luaM_freearray(L, b, n, t) luaM_realloc(L, (b), \ |
24 | cast(lu_mem, n)*cast(lu_mem, sizeof(t)), 0) | 24 | cast(lu_mem, n)*cast(lu_mem, sizeof(t)), 0) |
25 | 25 | ||
@@ -127,7 +127,7 @@ Hash *luaH_new (lua_State *L, int size) { | |||
127 | 127 | ||
128 | void luaH_free (lua_State *L, Hash *t) { | 128 | void luaH_free (lua_State *L, Hash *t) { |
129 | luaM_freearray(L, t->node, t->size, Node); | 129 | luaM_freearray(L, t->node, t->size, Node); |
130 | luaM_freelem(L, t, Hash); | 130 | luaM_freelem(L, t); |
131 | } | 131 | } |
132 | 132 | ||
133 | 133 | ||