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)
This commit is contained in:
Roberto Ierusalimschy
2017-07-27 10:50:16 -03:00
parent 11769b203f
commit 6d998055c8
5 changed files with 24 additions and 16 deletions

View File

@@ -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))