aboutsummaryrefslogtreecommitdiff
path: root/lstring.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-07-27 10:50:16 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-07-27 10:50:16 -0300
commit6d998055c80a0fe8d4698ba02becb1813203eee9 (patch)
tree7f39b89a0d383bc8a96708c5b1cc36a036099a2a /lstring.h
parent11769b203f052f7423575c1a66901cb9eb277206 (diff)
downloadlua-6d998055c80a0fe8d4698ba02becb1813203eee9.tar.gz
lua-6d998055c80a0fe8d4698ba02becb1813203eee9.tar.bz2
lua-6d998055c80a0fe8d4698ba02becb1813203eee9.zip
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)
Diffstat (limited to 'lstring.h')
-rw-r--r--lstring.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/lstring.h b/lstring.h
index 6351003a..416d9519 100644
--- a/lstring.h
+++ b/lstring.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstring.h,v 1.60 2015/09/08 15:41:05 roberto Exp roberto $ 2** $Id: lstring.h,v 1.61 2015/11/03 15:36:01 roberto Exp roberto $
3** String table (keep all strings handled by Lua) 3** String table (keep all strings handled by Lua)
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -12,6 +12,13 @@
12#include "lstate.h" 12#include "lstate.h"
13 13
14 14
15/*
16** Memory-allocation error message must be preallocated (it cannot
17** be created after memory is exausted)
18*/
19#define MEMERRMSG "not enough memory"
20
21
15#define sizelstring(l) (sizeof(union UTString) + ((l) + 1) * sizeof(char)) 22#define sizelstring(l) (sizeof(union UTString) + ((l) + 1) * sizeof(char))
16 23
17#define sizeludata(l) (sizeof(union UUdata) + (l)) 24#define sizeludata(l) (sizeof(union UUdata) + (l))