keep memory-error message in the global state, so that its use

does not depend on Lua internalizing strings to avoid a string
creation on memory errors
This commit is contained in:
Roberto Ierusalimschy
2010-04-08 14:16:46 -03:00
parent 28aa733c15
commit 055104f5b6
4 changed files with 13 additions and 9 deletions

4
lmem.h
View File

@@ -1,5 +1,5 @@
/*
** $Id: lmem.h,v 1.34 2009/04/17 14:40:13 roberto Exp roberto $
** $Id: lmem.h,v 1.35 2009/12/16 16:42:58 roberto Exp roberto $
** Interface to Memory Manager
** See Copyright Notice in lua.h
*/
@@ -13,8 +13,6 @@
#include "llimits.h"
#include "lua.h"
#define MEMERRMSG "not enough memory"
#define luaM_reallocv(L,b,on,n,e) \
((cast(size_t, (n)+1) <= MAX_SIZET/(e)) ? /* +1 to avoid warnings */ \