From 6d998055c80a0fe8d4698ba02becb1813203eee9 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 27 Jul 2017 10:50:16 -0300 Subject: no more reference 'memerrmsg' + new reference to "n" (both can be retrieved by 'luaS_newliteral' without creating anything, because they are fixed, but "n" deserves fast access while 'memerrmsg' does not) --- lstring.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lstring.h') diff --git a/lstring.h b/lstring.h index 6351003a..416d9519 100644 --- a/lstring.h +++ b/lstring.h @@ -1,5 +1,5 @@ /* -** $Id: lstring.h,v 1.60 2015/09/08 15:41:05 roberto Exp roberto $ +** $Id: lstring.h,v 1.61 2015/11/03 15:36:01 roberto Exp roberto $ ** String table (keep all strings handled by Lua) ** See Copyright Notice in lua.h */ @@ -12,6 +12,13 @@ #include "lstate.h" +/* +** Memory-allocation error message must be preallocated (it cannot +** be created after memory is exausted) +*/ +#define MEMERRMSG "not enough memory" + + #define sizelstring(l) (sizeof(union UTString) + ((l) + 1) * sizeof(char)) #define sizeludata(l) (sizeof(union UUdata) + (l)) -- cgit v1.2.3-55-g6feb