aboutsummaryrefslogtreecommitdiff
path: root/lmem.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-06-18 12:19:27 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-06-18 12:19:27 -0300
commit1dbe708aa84f3a1e51daf8d7e2f714e2b02f554b (patch)
treee845de9ee24b94362146e38410ae0670df18526b /lmem.c
parent8f080fd683d63b0cd4b38380f6a5bdae5d6e2584 (diff)
downloadlua-1dbe708aa84f3a1e51daf8d7e2f714e2b02f554b.tar.gz
lua-1dbe708aa84f3a1e51daf8d7e2f714e2b02f554b.tar.bz2
lua-1dbe708aa84f3a1e51daf8d7e2f714e2b02f554b.zip
new protocol for error handling
Diffstat (limited to '')
-rw-r--r--lmem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lmem.c b/lmem.c
index 00c7253b..369b1812 100644
--- a/lmem.c
+++ b/lmem.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lmem.c,v 1.55 2002/05/15 18:57:44 roberto Exp roberto $ 2** $Id: lmem.c,v 1.56 2002/06/11 16:23:47 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*/
@@ -66,7 +66,7 @@ void *luaM_realloc (lua_State *L, void *block, lu_mem oldsize, lu_mem size) {
66 block = l_realloc(block, oldsize, size); 66 block = l_realloc(block, oldsize, size);
67 if (block == NULL) { 67 if (block == NULL) {
68 if (L) 68 if (L)
69 luaD_error(L, MEMERRMSG, LUA_ERRMEM); 69 luaD_throw(L, LUA_ERRMEM);
70 else return NULL; /* error before creating state! */ 70 else return NULL; /* error before creating state! */
71 } 71 }
72 } 72 }