diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-07-27 10:50:16 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-07-27 10:50:16 -0300 |
| commit | 6d998055c80a0fe8d4698ba02becb1813203eee9 (patch) | |
| tree | 7f39b89a0d383bc8a96708c5b1cc36a036099a2a /lstring.h | |
| parent | 11769b203f052f7423575c1a66901cb9eb277206 (diff) | |
| download | lua-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.h | 9 |
1 files changed, 8 insertions, 1 deletions
| @@ -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)) |
