summaryrefslogtreecommitdiff
path: root/lmem.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-01-24 13:45:33 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-01-24 13:45:33 -0200
commit71ae4801d66d9592b0fb08e4e78138b7a6e993d5 (patch)
treea683b5b3757efb979329bf513f1bd9fde3fb9d1f /lmem.c
parent6fda6a530265268c01a83c31f8fc30e34753bbf1 (diff)
downloadlua-71ae4801d66d9592b0fb08e4e78138b7a6e993d5.tar.gz
lua-71ae4801d66d9592b0fb08e4e78138b7a6e993d5.tar.bz2
lua-71ae4801d66d9592b0fb08e4e78138b7a6e993d5.zip
macros LUA_ENTRY/LUA_EXIT to control exclusive access to Lua core
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 0756fe91..a631f4b1 100644
--- a/lmem.c
+++ b/lmem.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lmem.c,v 1.42 2000/12/28 12:55:41 roberto Exp roberto $ 2** $Id: lmem.c,v 1.43 2001/01/19 13:20:30 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*/
@@ -134,7 +134,7 @@ void *luaM_growaux (lua_State *L, void *block, int *size, int size_elems,
134 else if (*size >= limit/2) { /* cannot double it? */ 134 else if (*size >= limit/2) { /* cannot double it? */
135 if (*size < limit - MINPOWER2) /* try something smaller... */ 135 if (*size < limit - MINPOWER2) /* try something smaller... */
136 newsize = limit; /* still have at least MINPOWER2 free places */ 136 newsize = limit; /* still have at least MINPOWER2 free places */
137 else lua_error(L, errormsg); 137 else luaD_error(L, errormsg);
138 } 138 }
139 newblock = luaM_realloc(L, block, (luint32)(*size)*(luint32)size_elems, 139 newblock = luaM_realloc(L, block, (luint32)(*size)*(luint32)size_elems,
140 (luint32)newsize*(luint32)size_elems); 140 (luint32)newsize*(luint32)size_elems);
@@ -152,7 +152,7 @@ void *luaM_realloc (lua_State *L, void *block, luint32 oldsize, luint32 size) {
152 block = NULL; 152 block = NULL;
153 } 153 }
154 else if (size >= MAX_SIZET) 154 else if (size >= MAX_SIZET)
155 lua_error(L, "memory allocation error: block too big"); 155 luaD_error(L, "memory allocation error: block too big");
156 else { 156 else {
157 block = basicrealloc(block, oldsize, size); 157 block = basicrealloc(block, oldsize, size);
158 if (block == NULL) { 158 if (block == NULL) {