aboutsummaryrefslogtreecommitdiff
path: root/lstring.h
diff options
context:
space:
mode:
Diffstat (limited to 'lstring.h')
-rw-r--r--lstring.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/lstring.h b/lstring.h
index 56896867..a413a9d3 100644
--- a/lstring.h
+++ b/lstring.h
@@ -19,7 +19,11 @@
19#define MEMERRMSG "not enough memory" 19#define MEMERRMSG "not enough memory"
20 20
21 21
22#define sizelstring(l) (sizeof(TString) + ((l) + 1) * sizeof(char)) 22/*
23** Size of a TString: Size of the header plus space for the string
24** itself (including final '\0').
25*/
26#define sizelstring(l) (offsetof(TString, contents) + ((l) + 1) * sizeof(char))
23 27
24#define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, \ 28#define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, \
25 (sizeof(s)/sizeof(char))-1)) 29 (sizeof(s)/sizeof(char))-1))