From 055104f5b6a0264974c5d9f2a55499420a1c9c2a Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 8 Apr 2010 14:16:46 -0300 Subject: 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 --- lstate.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lstate.h') diff --git a/lstate.h b/lstate.h index 1c70aca8..17cf2e06 100644 --- a/lstate.h +++ b/lstate.h @@ -1,5 +1,5 @@ /* -** $Id: lstate.h,v 2.59 2010/03/29 17:43:14 roberto Exp roberto $ +** $Id: lstate.h,v 2.60 2010/04/05 16:35:37 roberto Exp roberto $ ** Global State ** See Copyright Notice in lua.h */ @@ -142,6 +142,7 @@ typedef struct global_State { lua_CFunction panic; /* to be called in unprotected errors */ struct lua_State *mainthread; const lua_Number *version; /* pointer to version number */ + TString *memerrmsg; /* memory-error message */ TString *tmname[TM_N]; /* array with tag-method names */ struct Table *mt[NUM_TAGS]; /* metatables for basic types */ } global_State; -- cgit v1.2.3-55-g6feb