diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-05-01 17:48:12 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-05-01 17:48:12 -0300 |
commit | 751cd867d3e0338279fa6f3390c8b7ddc0108659 (patch) | |
tree | 726f6f3cd49109382b2c0d7ee6a1e0fea740afbd /lmem.c | |
parent | b36b2a061c88be22e36900146cbcad39bab07f5d (diff) | |
download | lua-751cd867d3e0338279fa6f3390c8b7ddc0108659.tar.gz lua-751cd867d3e0338279fa6f3390c8b7ddc0108659.tar.bz2 lua-751cd867d3e0338279fa6f3390c8b7ddc0108659.zip |
new way to handle errors
Diffstat (limited to '')
-rw-r--r-- | lmem.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lmem.c,v 1.52 2001/11/28 20:13:13 roberto Exp roberto $ | 2 | ** $Id: lmem.c,v 1.53 2002/04/22 14:40:23 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 | */ |
@@ -58,7 +58,7 @@ void *luaM_realloc (lua_State *L, void *block, lu_mem oldsize, lu_mem size) { | |||
58 | block = l_realloc(block, oldsize, size); | 58 | block = l_realloc(block, oldsize, size); |
59 | if (block == NULL) { | 59 | if (block == NULL) { |
60 | if (L) | 60 | if (L) |
61 | luaD_error(L, NULL, LUA_ERRMEM); /* break run without error message */ | 61 | luaD_error(L, MEMERRMSG, LUA_ERRMEM); |
62 | else return NULL; /* error before creating state! */ | 62 | else return NULL; /* error before creating state! */ |
63 | } | 63 | } |
64 | } | 64 | } |